@Test
public void shouldAllowValidLongValue() throws Exception {

    NodeType constrainedType = validateTypeDefinition();
    JcrPropertyDefinition prop = propertyDefinitionFor(constrainedType, TestLexicon.CONSTRAINED_LONG);
    assertThat(prop.satisfiesConstraints(valueFor(Long.MIN_VALUE, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(0, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(0.1, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(4.99, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(10, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(10.100, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(19, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(31, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(40, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(50, PropertyType.LONG), session), is(true));
    assertThat(prop.satisfiesConstraints(valueFor(Long.MAX_VALUE, PropertyType.LONG), session), is(true));
}