@Test
public void shouldAllowValidReferenceValue() throws Exception {

    NodeType constrainedType = validateTypeDefinition();
    JcrPropertyDefinition prop = propertyDefinitionFor(constrainedType, TestLexicon.CONSTRAINED_REFERENCE);
    Value value = session.getValueFactory().createValue(session.getRootNode());
    assertThat(prop.satisfiesConstraints(value, session), is(true));
}