@Test
public void shouldNotAllowInvalidReferenceValues() throws Exception {

    NodeType constrainedType = validateTypeDefinition();
    JcrPropertyDefinition prop = propertyDefinitionFor(constrainedType, TestLexicon.CONSTRAINED_REFERENCE);
    Value value = session.getValueFactory().createValue(session.getRootNode().getNode("a"));
    assertThat(satisfiesConstraints(prop, new Value[] {value}), is(false));
}