de.printStackTrace();
fail( de.getMessage() );
}
// Check the decoded ExtendedResponse PDU
ExtendedResponse extendedResponse = container.getMessage();
assertEquals( 1, extendedResponse.getMessageId() );
assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
assertEquals( "", extendedResponse.getLdapResult().getMatchedDn().getName() );
assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
assertEquals( "1.3.6.1.5.5.2", extendedResponse.getID() );
assertEquals( "value", Strings.utf8ToString((byte[]) extendedResponse.getEncodedValue()) );
// Check the Control
Map<String, Control> controls = extendedResponse.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" );