public void testSaslCramMd5Bind() throws Exception
{
Dn userDn = new Dn( "uid=hnelson,ou=users,dc=example,dc=com" );
LdapNetworkConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
CramMd5Request request = new CramMd5Request();
request.setUsername( userDn.getRdn().getUpValue().getString() );
request.setCredentials( "secret" );
BindResponse resp = connection.bind( request );
assertEquals( ResultCodeEnum.SUCCESS, resp.getLdapResult().getResultCode() );
Entry entry = connection.lookup( userDn );