CodecControl<Control> control = ( org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls
.get( "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() ) );
DeleteRequest internalDeleteRequest = new DeleteRequestImpl();
internalDeleteRequest.setMessageId( delRequest.getMessageId() );
internalDeleteRequest.setName( delRequest.getName() );
internalDeleteRequest.addControl( control );
// Check the encoding
try
{
ByteBuffer bb = encoder.encodeMessage( internalDeleteRequest );