testNValue.setName("exo:testReregisterValueConstraintChangeResidualProperty");
testNValue.setPrimaryItemName("");
testNValue.setDeclaredSupertypeNames(superType);
List<PropertyDefinitionValue> props = new ArrayList<PropertyDefinitionValue>();
props.add(new PropertyDefinitionValue("*", false, false, 1, false, new ArrayList<String>(), false,
PropertyType.LONG, new ArrayList<String>()));
testNValue.setDeclaredPropertyDefinitionValues(props);
nodeTypeManager.registerNodeType(testNValue, ExtendedNodeTypeManager.FAIL_IF_EXISTS);
Node tNode = root.addNode("test", "exo:testReregisterValueConstraintChangeResidualProperty");
tNode.setProperty("tt", 100);
Property prop = tNode.setProperty("t1", 150);
tNode.setProperty("t2", 1);
tNode.setProperty("t3", 200);
session.save();
List<String> valueConstraint = new ArrayList<String>();
valueConstraint.add("(,100]");
valueConstraint.add("[200,)");
props = new ArrayList<PropertyDefinitionValue>();
props.add(new PropertyDefinitionValue("*", false, false, 1, false, new ArrayList<String>(), false,
PropertyType.LONG, valueConstraint));
testNValue.setDeclaredPropertyDefinitionValues(props);
try
{
nodeTypeManager.registerNodeType(testNValue, ExtendedNodeTypeManager.REPLACE_IF_EXISTS);