* Tests bind operation on referral entry.
*/
@Test
public void testOnReferralWithOrWithoutManageDsaItControl() throws Exception
{
LDAPConnection conn = new LDAPConnection();
LDAPConstraints constraints = new LDAPConstraints();
constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, Strings.EMPTY_BYTES ) );
constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, Strings.EMPTY_BYTES ) );
conn.setConstraints( constraints );
try
{
conn.connect( 3, "localhost", getLdapServer().getPort(),
"uid=akarasuluref,ou=users,ou=system", "secret", constraints );
fail( "try to connect with illegal version number should fail" );
}
catch ( LDAPException e )
{
assertEquals( "statuscode", LDAPException.INVALID_CREDENTIALS, e.getLDAPResultCode() );
}
try
{
conn.connect( 3, "localhost", getLdapServer().getPort(),
"uid=akarasuluref,ou=users,ou=system", "secret" );
fail( "try to connect with illegal version number should fail" );
}
catch ( LDAPException e )
{