de.printStackTrace();
fail( de.getMessage() );
}
// Check the decoded ExtendedRequest PDU
ExtendedRequest extendedRequest = container.getMessage();
assertEquals( 1, extendedRequest.getMessageId() );
assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
assertEquals( "value", Strings.utf8ToString(extendedRequest.getRequestValue()) );
// Check the Control
Map<String, Control> controls = extendedRequest.getControls();
assertEquals( 1, controls.size() );
assertTrue( extendedRequest.hasControl( "2.16.840.1.113730.3.4.2" ) );
@SuppressWarnings("unchecked")
CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) extendedRequest.getControl( "2.16.840.1.113730.3.4.2" );
assertEquals( "", Strings.dumpBytes( ( byte[] ) control.getValue() ) );
// Check the encoding
try
{