LdapConnection conn = getWiredConnection( getLdapServer() );
// delete success
DeleteRequest deleteRequest = new DeleteRequestImpl();
deleteRequest.setName( new Dn( "ou=Computers,uid=akarasuluref,ou=users,ou=system" ) );
DeleteResponse deleteResponse = conn.delete( deleteRequest );
assertEquals( ResultCodeEnum.REFERRAL, deleteResponse.getLdapResult().getResultCode() );
assertTrue( deleteResponse.getLdapResult().getReferral().getLdapUrls()
.contains( "ldap://localhost:10389/ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
assertTrue( deleteResponse.getLdapResult().getReferral().getLdapUrls()
.contains( "ldap://foo:10389/ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
assertTrue( deleteResponse.getLdapResult().getReferral().getLdapUrls()
.contains( "ldap://bar:10389/ou=Computers,uid=akarasulu,ou=users,ou=system" ) );
conn.close();
}