* Tests to see the same exact copy returns true.
*/
@Test
public void testNotEqualsDiffResult() throws LdapException
{
AbstractResultResponse msg0 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
{
private static final long serialVersionUID = 1L;
};
AbstractResultResponse msg1 = new AbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
{
private static final long serialVersionUID = 1L;
};
LdapResult r0 = msg0.getLdapResult();
LdapResult r1 = msg1.getLdapResult();
r0.setDiagnosticMessage( "blah blah blah" );
r1.setDiagnosticMessage( "blah blah blah" );
r0.setMatchedDn( new Dn( "dc=example,dc=com" ) );
r1.setMatchedDn( new Dn( "dc=apache,dc=org" ) );
r0.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
r1.setResultCode( ResultCodeEnum.TIME_LIMIT_EXCEEDED );
Referral refs0 = new ReferralImpl();
refs0.addLdapUrl( "ldap://someserver.com" );
refs0.addLdapUrl( "ldap://anotherserver.org" );
Referral refs1 = new ReferralImpl();
refs1.addLdapUrl( "ldap://someserver.com" );
refs1.addLdapUrl( "ldap://anotherserver.org" );
assertFalse( msg0.equals( msg1 ) );
assertFalse( msg1.equals( msg0 ) );
}