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