public void testAddObjectClasses() throws Exception
{
DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// modify object classes, add two more
Attributes attributes = LdifUtils.createJndiAttributes( "objectClass: organizationalPerson",
"objectClass: inetOrgPerson" );
DirContext person = ( DirContext ) ctx.lookup( RDN );
person.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, attributes );
// Read again from directory
person = ( DirContext ) ctx.lookup( RDN );
attributes = person.getAttributes( "" );
javax.naming.directory.Attribute newOcls = attributes.get( "objectClass" );
String[] expectedOcls =
{ "top", "person", "organizationalPerson", "inetOrgPerson" };
for ( String name : expectedOcls )