### Question:
String extends Message { public static String fromJsonObject(JsonObject jsonObject) { java.lang.String data = jsonObject.containsKey(String.FIELD_DATA) ? jsonObject .getString(String.FIELD_DATA) : ""; return new String(data); } 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 testFromJsonObject() { JsonObject jsonObject = Json.createObjectBuilder() .add(String.FIELD_DATA, s1.getData()).build(); String data = String.fromJsonObject(jsonObject); 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()); }