### Question:
Message extends JsonWrapper { public String getMessageType() { return this.messageType; } Message();  Message(String jsonString);  Message(String jsonString, String messageType);  Message(JsonObject jsonObject);  Message(JsonObject jsonObject, String messageType); String getMessageType(); void setMessageType(String messageType); @Override Message clone(); static final String EMPTY_MESSAGE; }### Answer:
@Test public void testConstructor() { assertEquals(Message.EMPTY_MESSAGE, empty.toString()); assertEquals(0, empty.toJsonObject().size()); assertEquals("", empty.getMessageType()); }
@Test public void testStringConstructor() { assertEquals("{\"test\":123,\"test2\":\"abc\"}", m1.toString()); assertEquals(2, m1.toJsonObject().size()); assertEquals(123, m1.toJsonObject().getInt("test")); assertEquals("abc", m1.toJsonObject().getString("test2")); assertEquals("", m1.getMessageType()); }
@Test public void testStringAndStringConstructor() { assertEquals("{\"test\":123,\"test2\":\"abc\"}", m3.toString()); assertEquals(2, m3.toJsonObject().size()); assertEquals(123, m3.toJsonObject().getInt("test")); assertEquals("abc", m3.toJsonObject().getString("test2")); assertEquals("type", m3.getMessageType()); }
@Test public void testJsonObjectConstructor() { assertEquals("{\"test\":123,\"test2\":\"abc\"}", m2.toString()); assertEquals(2, m2.toJsonObject().size()); assertEquals(123, m2.toJsonObject().getInt("test")); assertEquals("abc", m2.toJsonObject().getString("test2")); assertEquals("", m2.getMessageType()); }
@Test public void testJsonObjectAndStringConstructor() { assertEquals("{\"test\":123,\"test2\":\"abc\"}", m4.toString()); assertEquals(2, m4.toJsonObject().size()); assertEquals(123, m4.toJsonObject().getInt("test")); assertEquals("abc", m4.toJsonObject().getString("test2")); assertEquals("type", m4.getMessageType()); }