@Override
    public float readFloat(@Nonnull String fieldName) throws IOException {
        FieldDefinition fd = cd.getField(fieldName);
        if (fd == null) {
            return 0f;
        }
        switch (fd.getType()) {
            case FLOAT:
                return super.readFloat(fieldName);
            case INT:
                return super.readInt(fieldName);
            case BYTE:
                return super.readByte(fieldName);
            case CHAR:
                return super.readChar(fieldName);
            case SHORT:
                return super.readShort(fieldName);
            default:
                throw createIncompatibleClassChangeError(fd, FLOAT);
        }
    }
@Test
    public void testReadFloat() throws Exception {
        float aByte = reader.readFloat("byte");
        float aShort = reader.readFloat("short");
        float aChar = reader.readFloat("char");
        float aInt = reader.readFloat("int");
        float aFloat = reader.readFloat("float");

        assertEquals(1, aByte, 0);
        assertEquals(3, aShort, 0);
        assertEquals(2, aChar, 0);
        assertEquals(4, aInt, 0);
        assertEquals(1f, aFloat, 0);
        assertEquals(0, reader.readFloat("NO SUCH FIELD"), 0);
    }