LDAPConstraints constraints = new LDAPConstraints();
constraints.setReferrals( false );
conn.setConstraints( constraints );
// comparison success
LDAPAttribute attribute = new LDAPAttribute( "uid", "akarasulu" );
assertTrue( conn.compare( "uid=akarasulu,ou=users,ou=system", attribute, constraints ) );
// referrals failure
attribute = new LDAPAttribute( "uid", "akarasulu" );
LDAPResponseListener listener = null;
LDAPResponse response = null;
listener = conn.compare( "uid=akarasuluref,ou=users,ou=system", attribute, null, constraints );
response = listener.getResponse();