### Question:
Bool extends Message { public boolean getData() { return this.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 testConstructor() { assertFalse(empty.getData()); assertEquals("{\"data\":false}", empty.toString()); assertEquals(1, empty.toJsonObject().size()); assertFalse(empty.toJsonObject().getBoolean(Bool.FIELD_DATA)); assertEquals(Bool.TYPE, empty.getMessageType()); }
@Test public void testBooleanConstructor() { assertTrue(b1.getData()); assertEquals("{\"data\":true}", b1.toString()); assertEquals(1, b1.toJsonObject().size()); assertTrue(b1.toJsonObject().getBoolean(Bool.FIELD_DATA)); assertEquals(Bool.TYPE, b1.getMessageType()); }