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