public void testMalformedCredentials()
throws Exception
{
InternalClientConnection conn =
new InternalClientConnection(new AuthenticationInfo());
BindOperation bindOperation =
conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_DIGEST_MD5, null);
assertEquals(bindOperation.getResultCode(),
ResultCode.SASL_BIND_IN_PROGRESS);
bindOperation =
conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_DIGEST_MD5,
ByteString.valueOf("malformed"));
assertFalse(bindOperation.getResultCode() == ResultCode.SUCCESS);
}