de.printStackTrace();
fail( de.getMessage() );
}
// Check the decoded BindRequest
BindRequest bindRequest = container.getMessage();
assertEquals( 1, bindRequest.getMessageId() );
assertTrue( bindRequest.isVersion3() );
assertEquals( "", bindRequest.getName().toString() );
assertFalse( bindRequest.isSimple() );
assertEquals( "", bindRequest.getSaslMechanism() );
assertEquals( "", Strings.utf8ToString(bindRequest.getCredentials()) );
// Check the Control
Map<String, Control> controls = bindRequest.getControls();
assertEquals( 1, controls.size() );
@SuppressWarnings("unchecked")
CodecControl<Control> control = (org.apache.directory.shared.ldap.codec.api.CodecControl<Control> ) controls.get( "2.16.840.1.113730.3.4.2" );