public float asFloat() {
        checkState(type == Type.FLOAT, "Value is not a float");
        return Float.parseFloat(value);
    }
@Test
    public void asFloat() {
        ConfigProperty p = defineProperty("foo", FLOAT, "123.0", "Foo Prop");
        validate(p, "foo", FLOAT, "123.0", "123.0");
        assertEquals("incorrect value", 123.0, p.asFloat(), 0.01);
        assertEquals("incorrect value", 123.0, p.asDouble(), 0.01);
    }