### Question:
Float32 extends Message { public float getData() { return this.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 testConstructor() { assertEquals(0f, empty.getData(), 0); assertEquals("{\"data\":0.0}", empty.toString()); assertEquals(1, empty.toJsonObject().size()); assertEquals(0.0, empty.toJsonObject() .getJsonNumber(Float32.FIELD_DATA).doubleValue(), 0); assertEquals(Float32.TYPE, empty.getMessageType()); }
@Test public void testFloatConstructor() { assertEquals(1.5f, f1.getData(), 0); assertEquals("{\"data\":1.5}", f1.toString()); assertEquals(1, f1.toJsonObject().size()); assertEquals(1.5, f1.toJsonObject().getJsonNumber(Float32.FIELD_DATA) .doubleValue(), 0); assertEquals(Float32.TYPE, f1.getMessageType()); }