{
de.printStackTrace();
fail( de.getMessage() );
}
ModifyDnRequest modifyDnRequest = ldapMessageContainer.getMessage();
assertEquals( 1, modifyDnRequest.getMessageId() );
assertEquals( "cn=testModify,ou=users,ou=system", modifyDnRequest.getName().toString() );
assertEquals( false, modifyDnRequest.getDeleteOldRdn() );
assertEquals( "cn=testDNModify", modifyDnRequest.getNewRdn().toString() );
assertEquals( "ou=system", modifyDnRequest.getNewSuperior().toString() );
// Check the Control
Map<String, Control> controls = modifyDnRequest.getControls();
assertEquals( 1, controls.size() );
@SuppressWarnings("unchecked")
CodecControl<Control> control = ( org.apache.directory.api.ldap.codec.api.CodecControl<Control> ) modifyDnRequest
.getControl( "2.16.840.1.113730.3.4.2" );
assertEquals( "2.16.840.1.113730.3.4.2", control.getOid() );
assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
// Check the encoding