### Question:
Time extends TimeBase<Time> { public static Time fromJsonObject(JsonObject jsonObject) { int secs = jsonObject.containsKey(Time.FIELD_SECS) ? jsonObject .getInt(Time.FIELD_SECS) : 0; int nsecs = jsonObject.containsKey(Time.FIELD_NSECS) ? jsonObject .getInt(Time.FIELD_NSECS) : 0; return new Time(secs, nsecs); } Time();  Time(int secs, int nsecs);  Time(double sec);  Time(long nano); @Override Time add(Time t); @Override Time subtract(Time t); boolean isValid(); Date toDate(); static boolean sleepUntil(Time t); @Override Time clone(); static Time now(); static Time fromSec(double sec); static Time fromNano(long nano); static Time fromDate(Date date); static Time fromJsonString(String jsonString); static Time fromJsonObject(JsonObject jsonObject); static final String TYPE; }### Answer:
@Test public void testFromJsonObject() { JsonObject jsonObject = Json.createObjectBuilder() .add(Time.FIELD_SECS, t1.getSecs()) .add(Time.FIELD_NSECS, t1.getNsecs()).build(); Time t = Time.fromJsonObject(jsonObject); assertEquals(t1.toString(), t.toString()); assertEquals(t1.toJsonObject(), t.toJsonObject()); assertEquals(t1.getPrimitiveType(), t.getPrimitiveType()); assertEquals(t1.getSecs(), t.getSecs()); assertEquals(t1.getNsecs(), t.getNsecs()); assertEquals(t1.toSec(), t.toSec(), 0); assertEquals(t1.toNSec(), t.toNSec()); assertNotSame(t1, t); assertNotSame(t1.toString(), t.toString()); assertNotSame(t1.toJsonObject(), t.toJsonObject()); }