@Test
public void testModifyDnAsync() throws Exception
{
Dn oldDn = new Dn( DN );
Dn newDn = new Dn( "cn=modifyDnWithString,ou=system" );
ModifyDnRequest modDnReq = new ModifyDnRequestImpl();
modDnReq.setName( oldDn );
modDnReq.setNewRdn( new Rdn( "cn=modifyDnWithString" ) );
modDnReq.setDeleteOldRdn( true );
ModifyDnFuture modifyDnFuture = connection.modifyDnAsync( modDnReq );
ModifyDnResponse response = modifyDnFuture.get( 1000, TimeUnit.MILLISECONDS );
assertNotNull( response );
assertTrue( connection.isAuthenticated() );
assertFalse( session.exists( oldDn ) );
assertTrue( session.exists( newDn ) );
assertTrue( session.exists( new Dn( "cn=modifyDnWithString,ou=system" ) ) );
}