BindRequestProtocolOp bindRequest =
new BindRequestProtocolOp(
ByteString.valueOf("cn=Directory Manager"),
3, ByteString.valueOf("password"));
LDAPMessage bindMessage = new LDAPMessage(1, bindRequest);
w.writeMessage(bindMessage);
bindMessage = r.readMessage();
BindResponseProtocolOp bindResponse = bindMessage.getBindResponseProtocolOp();
assertEquals(bindResponse.getResultCode(), LDAPResultCode.SUCCESS);