// It's an opaque extended operation
@SuppressWarnings("unchecked")
ExtendedResponseDecorator<ExtendedResponse> response = ( ExtendedResponseDecorator<ExtendedResponse> ) decoratedResponse;
// Decode the response, as it's an opaque operation
StartTlsResponse startTlsResponse = new StartTlsResponseImpl( response.getMessageId() );
startTlsResponse.getLdapResult().setResultCode( response.getLdapResult().getResultCode() );
startTlsResponse.getLdapResult().setDiagnosticMessage( response.getLdapResult().getDiagnosticMessage() );
StartTlsResponseDecorator decorated = new StartTlsResponseDecorator( codec, new StartTlsResponseImpl() );
return decorated;
}