### Question:
Vector3Stamped extends Message { public static Vector3Stamped fromJsonObject(JsonObject jsonObject) { Header header = jsonObject.containsKey(Vector3Stamped.FIELD_HEADER) ? Header .fromJsonObject(jsonObject .getJsonObject(Vector3Stamped.FIELD_HEADER)) : new Header(); Vector3 vector = jsonObject.containsKey(Vector3Stamped.FIELD_VECTOR) ? Vector3 .fromJsonObject(jsonObject .getJsonObject(Vector3Stamped.FIELD_VECTOR)) : new Vector3(); return new Vector3Stamped(header, vector); } Vector3Stamped();  Vector3Stamped(Header header, Vector3 vector); Header getHeader(); Vector3 getVector3(); @Override Vector3Stamped clone(); static Vector3Stamped fromJsonString(String jsonString); static Vector3Stamped fromMessage(Message m); static Vector3Stamped fromJsonObject(JsonObject jsonObject); static final String FIELD_HEADER; static final String FIELD_VECTOR; static final String TYPE; }### Answer:
@Test public void testFromJsonObject() { JsonObject jsonObject = Json .createObjectBuilder() .add(Vector3Stamped.FIELD_HEADER, v1.getHeader().toJsonObject()) .add(Vector3Stamped.FIELD_VECTOR, v1.getVector3().toJsonObject()).build(); Vector3Stamped p = Vector3Stamped.fromJsonObject(jsonObject); assertEquals(v1.toString(), p.toString()); assertEquals(v1.toJsonObject(), p.toJsonObject()); assertEquals(v1.getMessageType(), p.getMessageType()); assertEquals(v1.getHeader(), p.getHeader()); assertEquals(v1.getVector3(), p.getVector3()); assertNotSame(v1, p); assertNotSame(v1.toString(), p.toString()); assertNotSame(v1.toJsonObject(), p.toJsonObject()); }