* Test a lookup( Dn ) operation with a list of attributes
*/
@Test
public void testLookupWithAttrs() throws Exception
{
EntryCursor cursor = connection.search( "cn=test,ou=system", "(ObjectClass=*)",SearchScope.SUBTREE, "name" );
while ( cursor.next() )
{
Entry entry = cursor.get();
assertNotNull( entry );
assertEquals( 2, entry.size() );
assertEquals( "test", entry.get( "cn" ).getString() );
assertEquals( "sn_test", entry.get( "sn" ).getString() );
assertFalse( entry.containsAttribute( "objectClass" ) );
}
cursor.close();
//Entry entry = connection.lookup( "cn=test,ou=system", "name" );
//assertNotNull( entry );
// We should have 2 attributes