@Test
public void shouldAllowValidNameValues() throws Exception {

    NodeType constrainedType = validateTypeDefinition();
    JcrPropertyDefinition prop = propertyDefinitionFor(constrainedType, TestLexicon.CONSTRAINED_NAME);
    Value[] values = new Value[] {valueFor("jcr:system", PropertyType.NAME),
        valueFor("modetest:constrainedType", PropertyType.NAME),};
    assertThat(satisfiesConstraints(prop, new Value[] {}), is(true));
    assertThat(satisfiesConstraints(prop, new Value[] {valueFor("jcr:system", PropertyType.NAME)}), is(true));
    assertThat(satisfiesConstraints(prop, values), is(true));
}