server
.setResponseSeq(new LdapMessage[] { new LdapMessage(
LdapASN1Constant.OP_EXTENDED_RESPONSE,
encodableResponse, null) });
ExtendedResponse response = context
.extendedOperation(new MockExtendedRequest());
assertTrue(response instanceof MockExtendedResponse);
assertEquals("It's my id", response.getID());
assertEquals(4, response.getEncodedValue().length);
assertEquals(0, response.getEncodedValue()[0]);
assertEquals(1, response.getEncodedValue()[1]);
assertEquals(2, response.getEncodedValue()[2]);
assertEquals(3, response.getEncodedValue()[3]);
// test exception
encodableResponse = new ASN1Encodable() {
public void encodeValues(Object[] values) {
new EncodableLdapResult().encodeValues(values);