### Question:
Header extends Message { public static Header fromJsonObject(JsonObject jsonObject) { long seq64 = jsonObject.containsKey(Header.FIELD_SEQ) ? jsonObject .getJsonNumber(Header.FIELD_SEQ).longValue() : 0; edu.wpi.rail.jrosbridge.primitives.Time stamp = jsonObject .containsKey(Header.FIELD_STAMP) ? edu.wpi.rail.jrosbridge.primitives.Time .fromJsonObject(jsonObject.getJsonObject(Header.FIELD_STAMP)) : new edu.wpi.rail.jrosbridge.primitives.Time(); java.lang.String frameID = jsonObject .containsKey(Header.FIELD_FRAME_ID) ? jsonObject .getString(Header.FIELD_FRAME_ID) : ""; int seq32 = Primitive.toUInt32(seq64); return new Header(seq32, stamp, frameID); } Header();  Header(int seq, edu.wpi.rail.jrosbridge.primitives.Time stamp,
			java.lang.String frameID); int getSeq(); edu.wpi.rail.jrosbridge.primitives.Time getStamp(); java.lang.String getFrameID(); @Override Header clone(); static Header fromJsonString(java.lang.String jsonString); static Header fromMessage(Message m); static Header fromJsonObject(JsonObject jsonObject); static final java.lang.String FIELD_SEQ; static final java.lang.String FIELD_STAMP; static final java.lang.String FIELD_FRAME_ID; static final java.lang.String TYPE; }### Answer:
@Test public void testFromJsonObject() { JsonObject jsonObject = Json.createObjectBuilder() .add(Header.FIELD_SEQ, h1.getSeq()) .add(Header.FIELD_STAMP, h1.getStamp().toJsonObject()) .add(Header.FIELD_FRAME_ID, h1.getFrameID()).build(); Header p = Header.fromJsonObject(jsonObject); assertEquals(h1.toString(), p.toString()); assertEquals(h1.toJsonObject(), p.toJsonObject()); assertEquals(h1.getMessageType(), p.getMessageType()); assertEquals(h1.getSeq(), p.getSeq()); assertEquals(h1.getStamp(), p.getStamp()); assertEquals(h1.getFrameID(), p.getFrameID()); assertNotSame(h1, p); assertNotSame(h1.toString(), p.toString()); assertNotSame(h1.toJsonObject(), p.toJsonObject()); }