public void testSaslBindPLAIN() throws Exception
{
LdapNetworkConnection connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
connection.setTimeOut( 0L );
BindResponse resp = connection.bindSaslPlain( "hnelson", "secret" );
assertEquals( ResultCodeEnum.SUCCESS, resp.getLdapResult().getResultCode() );
Dn userDn = new Dn( "uid=hnelson,ou=users,dc=example,dc=com" );
Entry entry = connection.lookup( userDn );
assertEquals( "hnelson", entry.get( "uid" ).getString() );