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();
assertEquals( ResultCodeEnum.REFERRAL.getValue(), response.getResultCode() );
assertEquals( "ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", response.getReferrals()[0] );
assertEquals( "ldap://foo:10389/uid=akarasulu,ou=users,ou=system", response.getReferrals()[1] );
assertEquals( "ldap://bar:10389/uid=akarasulu,ou=users,ou=system", response.getReferrals()[2] );