public long asLong() {
        checkState(type == Type.INTEGER || type == Type.LONG, "Value is not a long or integer");
        return Long.parseLong(value);
    }
@Test
    public void asLong() {
        ConfigProperty p = defineProperty("foo", LONG, "123", "Foo Prop");
        validate(p, "foo", LONG, "123", "123");
        assertEquals("incorrect value", 123L, p.asLong());
    }