### Question:
Bool extends Message { public static Bool fromJsonObject(JsonObject jsonObject) { boolean data = jsonObject.containsKey(Bool.FIELD_DATA) ? jsonObject .getBoolean(Bool.FIELD_DATA) : false; return new Bool(data); } Bool();  Bool(boolean data); boolean getData(); @Override Bool clone(); static Bool fromJsonString(java.lang.String jsonString); static Bool fromMessage(Message m); static Bool 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(Bool.FIELD_DATA, b1.getData()).build(); Bool data = Bool.fromJsonObject(jsonObject); assertEquals(b1.toString(), data.toString()); assertEquals(b1.toJsonObject(), data.toJsonObject()); assertEquals(b1.getMessageType(), data.getMessageType()); assertEquals(b1.getData(), data.getData()); assertNotSame(b1, data); assertNotSame(b1.toString(), data.toString()); assertNotSame(b1.toJsonObject(), data.toJsonObject()); }