schemaManager.loadWithDeps( "collective" );
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
// Check a addition in MUST
MutableObjectClass objectClassMust = new MutableObjectClass( "1.1.1" );
objectClassMust.addMustAttributeTypeOids( "c-o", "ref" );
// collective attribute in MUST : failure expected
assertFalse( schemaManager.add( objectClassMust ) );
assertEquals( 1, schemaManager.getErrors().size() );
assertTrue( schemaManager.getErrors().get( 0 ) instanceof LdapSchemaException );
assertFalse( isOCPresent( schemaManager, "1.1.1" ) );
assertEquals( ocrSize, schemaManager.getObjectClassRegistry().size() );
assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
// Check an addition in MAY
MutableObjectClass objectClassMay = new MutableObjectClass( "1.1.1" );
objectClassMay.addMayAttributeTypeOids( "c-o", "ref" );
// collective attribute in MAY : failure expected
assertFalse( schemaManager.add( objectClassMay ) );
assertEquals( 1, schemaManager.getErrors().size() );