assertTrue(containsPropertyDefintion(test1.getPropertyDefinitions(), "ocm:testProperty"));
}
public void testCreateSingleNodeType() throws Exception
{
ClassDescriptor classDescriptor = new ClassDescriptor();
classDescriptor.setClassName("test.TestClass");
classDescriptor.setJcrType("ocm:test2");
classDescriptor.setJcrSuperTypes("nt:base");
FieldDescriptor field1 = new FieldDescriptor();
field1.setFieldName("a");
field1.setJcrName("ocm:a");
field1.setJcrType("String");
field1.setJcrAutoCreated(true);
field1.setJcrMandatory(true);
field1.setJcrMultiple(true);
classDescriptor.addFieldDescriptor(field1);
FieldDescriptor field2 = new FieldDescriptor();
field2.setFieldName("b");
field2.setJcrName("ocm:b");
field2.setJcrType("Long");
field1.setJcrAutoCreated(false);
field1.setJcrMandatory(true);
field1.setJcrMultiple(false);
classDescriptor.addFieldDescriptor(field2);
getJackrabbitNodeTypeManagerImpl().createSingleNodeType(session, classDescriptor);
NodeType testNodeType = session.getWorkspace().getNodeTypeManager().getNodeType("ocm:test2");
assertNotNull(testNodeType);