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