SchemaManager schemaManager = loadSystem();
int ctrSize = schemaManager.getComparatorRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
String oid = "0.0.0";
LdapComparator<?> bc = new BooleanComparator( oid );
assertTrue( schemaManager.add( bc ) );
LdapComparator<?> added = schemaManager.lookupComparatorRegistry( oid );
assertNotNull( added );
assertEquals( bc.getClass().getName(), added.getFqcn() );
List<Throwable> errors = schemaManager.getErrors();
assertEquals( 0, errors.size() );
assertEquals( ctrSize + 1, schemaManager.getComparatorRegistry().size() );
assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
LdapComparator<?> lc = new CsnComparator( oid );
assertFalse( schemaManager.add( lc ) );
errors = schemaManager.getErrors();
assertEquals( 1, errors.size() );
assertEquals( ctrSize + 1, schemaManager.getComparatorRegistry().size() );
assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
added = schemaManager.lookupComparatorRegistry( oid );
assertNotNull( added );
assertEquals( bc.getClass().getName(), added.getFqcn() );
}