// comparison success
assertTrue( conn.compare( "uid=akarasuluref,ou=users,ou=system", "uid", "akarasuluref" ) );
// comparison failure
CompareRequest compareRequest = new CompareRequestImpl();
compareRequest.setName( new Dn( "uid=akarasuluref,ou=users,ou=system" ) );
compareRequest.setAttributeId( "uid" );
compareRequest.setAssertionValue( "elecharny" );
ManageDsaIT manageDSAIT = new ManageDsaITImpl();
manageDSAIT.setCritical( true );
compareRequest.addControl( manageDSAIT );
CompareResponse compareResponse = conn.compare( compareRequest );
assertEquals( ResultCodeEnum.COMPARE_FALSE, compareResponse.getLdapResult().getResultCode() );
conn.close();