### Question:
Empty extends Message { public static Empty fromMessage(Message m) { return Empty.fromJsonObject(m.toJsonObject()); } Empty(); @Override Empty clone(); static Empty fromJsonString(java.lang.String jsonString); static Empty fromMessage(Message m); static Empty fromJsonObject(JsonObject jsonObject); static final java.lang.String TYPE; }### Answer:
@Test public void testFromMessage() { Message m = new Message(empty.toString()); Empty data = Empty.fromMessage(m); assertEquals(empty.toString(), data.toString()); assertEquals(empty.toJsonObject(), data.toJsonObject()); assertEquals(empty.getMessageType(), data.getMessageType()); assertNotSame(empty, data); assertNotSame(empty.toString(), data.toString()); assertNotSame(empty.toJsonObject(), data.toJsonObject()); }