public void testBindShortCircuitInPreParseSimpleAnonymous()
throws Exception
{
Socket s = new Socket("127.0.0.1", TestCaseUtils.getServerLdapPort());
LDAPReader r = new LDAPReader(s);
LDAPWriter w = new LDAPWriter(s);
s.setSoTimeout(6000);
BindRequestProtocolOp bindRequest =
new BindRequestProtocolOp(ByteString.empty(), 3,
ByteString.empty());
LDAPMessage message = new LDAPMessage(1, bindRequest,
ShortCircuitPlugin.createShortCircuitControlList(80, "PreParse"));
w.writeMessage(message);
message = r.readMessage();
BindResponseProtocolOp bindResponse = message.getBindResponseProtocolOp();
assertEquals(bindResponse.getResultCode(), 80);