LdapConnection connection = new LdapConnection( "localhost", ldapServer.getPort() );
connection.bind( "uid=admin,ou=system", "secret" );
long t2 = System.currentTimeMillis();
Cursor<SearchResponse> cursor = connection.search( "dc=example,dc=com", "(objectClass=*)", SearchScope.SUBTREE,
"*" );
while ( cursor.next() )
{
SearchResponse sr = cursor.get();
SearchResultEntry sre = ( SearchResultEntry ) sr;