### Question:
TransformStamped extends Message { public static TransformStamped fromJsonObject(JsonObject jsonObject) { Header header = jsonObject.containsKey(TransformStamped.FIELD_HEADER) ? Header .fromJsonObject(jsonObject .getJsonObject(TransformStamped.FIELD_HEADER)) : new Header(); String childFrameID = jsonObject .containsKey(TransformStamped.FIELD_CHILD_FRAME_ID) ? jsonObject .getString(TransformStamped.FIELD_CHILD_FRAME_ID) : ""; Transform transform = jsonObject .containsKey(TransformStamped.FIELD_TRANSFORM) ? Transform .fromJsonObject(jsonObject .getJsonObject(TransformStamped.FIELD_TRANSFORM)) : new Transform(); return new TransformStamped(header, childFrameID, transform); } TransformStamped();  TransformStamped(Header header, String childFrameID,
			Transform transform); Header getHeader(); String getChildFrameID(); Transform getTransform(); @Override TransformStamped clone(); static TransformStamped fromJsonString(String jsonString); static TransformStamped fromMessage(Message m); static TransformStamped fromJsonObject(JsonObject jsonObject); static final String FIELD_HEADER; static final String FIELD_CHILD_FRAME_ID; static final String FIELD_TRANSFORM; static final String TYPE; }### Answer:
@Test public void testFromJsonObject() { JsonObject jsonObject = Json .createObjectBuilder() .add(TransformStamped.FIELD_HEADER, t1.getHeader().toJsonObject()) .add(TransformStamped.FIELD_CHILD_FRAME_ID, t1.getChildFrameID()) .add(TransformStamped.FIELD_TRANSFORM, t1.getTransform().toJsonObject()).build(); TransformStamped p = TransformStamped.fromJsonObject(jsonObject); assertEquals(t1.toString(), p.toString()); assertEquals(t1.toJsonObject(), p.toJsonObject()); assertEquals(t1.getMessageType(), p.getMessageType()); assertEquals(t1.getHeader(), p.getHeader()); assertEquals(t1.getChildFrameID(), p.getChildFrameID()); assertEquals(t1.getTransform(), p.getTransform()); assertNotSame(t1, p); assertNotSame(t1.toString(), p.toString()); assertNotSame(t1.toJsonObject(), p.toJsonObject()); }