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