@Test
public void testOnReferralWithManageDsaITControl() throws Exception
{
LDAPConnection conn = getWiredConnection( getLdapServer() );
LDAPConstraints constraints = new LDAPSearchConstraints();
constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
conn.setConstraints( constraints );
// ModifyDN success
conn.rename( "uid=akarasuluref,ou=users,ou=system", "uid=ref", true, constraints );
LDAPEntry entry = conn.read( "uid=ref,ou=users,ou=system", ( LDAPSearchConstraints ) constraints );