@Test
public void shouldNotAllowInvalidNameValues() throws Exception {

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