### Question:
Float32 extends Message { public static Float32 fromJsonObject(JsonObject jsonObject) { float data = jsonObject.containsKey(Float32.FIELD_DATA) ? (float) jsonObject .getJsonNumber(Float32.FIELD_DATA).doubleValue() : 0f; return new Float32(data); } Float32();  Float32(float data); float getData(); @Override Float32 clone(); static Float32 fromJsonString(java.lang.String jsonString); static Float32 fromMessage(Message m); static Float32 fromJsonObject(JsonObject jsonObject); static final java.lang.String FIELD_DATA; static final java.lang.String TYPE; }### Answer:
@Test public void testFromJsonObject() { JsonObject jsonObject = Json.createObjectBuilder() .add(Float32.FIELD_DATA, f1.getData()).build(); Float32 data = Float32.fromJsonObject(jsonObject); assertEquals(f1.toString(), data.toString()); assertEquals(f1.toJsonObject(), data.toJsonObject()); assertEquals(f1.getMessageType(), data.getMessageType()); assertEquals(f1.getData(), data.getData(), 0); assertNotSame(f1, data); assertNotSame(f1.toString(), data.toString()); assertNotSame(f1.toJsonObject(), data.toJsonObject()); }