{
de.printStackTrace();
fail( de.getMessage() );
}
SearchResultEntry searchResultEntry = ldapMessageContainer.getMessage();
assertEquals( 1, searchResultEntry.getMessageId() );
assertEquals( "ou=contacts,dc=iktek,dc=com", searchResultEntry.getObjectName().toString() );
Entry entry = searchResultEntry.getEntry();
assertEquals( 1, entry.size() );
for ( int i = 0; i < entry.size(); i++ )
{
EntryAttribute attribute = entry.get( "objectclass" );
assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
assertTrue( attribute.contains( "" ) );
}
// Check the Control
Map<String, Control> controls = searchResultEntry.getControls();
assertEquals( 1, controls.size() );
CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> )controls.get( "2.16.840.1.113730.3.4.2" );
assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );