connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
SaslDigestMd5Request digetDigestMd5Request = new SaslDigestMd5Request();
digetDigestMd5Request.setUsername( userDn.getRdn().getValue().getString() );
digetDigestMd5Request.setCredentials( "secret" );
digetDigestMd5Request.setRealmName( ldapServer.getSaslRealms().get( 0 ) );
resp = connection.bind( digetDigestMd5Request );
assertEquals( ResultCodeEnum.SUCCESS, resp.getLdapResult().getResultCode() );
entry = connection.lookup( userDn );
assertEquals( "hnelson", entry.get( "uid" ).getString() );
connection.close();