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