* Tests two non default carbon copies for equality.
*/
@Test
public void testEqualsCarbonCopy() throws LdapException
{
LdapResultImpl r0 = new LdapResultImpl();
LdapResultImpl r1 = new LdapResultImpl();
r0.setDiagnosticMessage( "blah blah blah" );
r1.setDiagnosticMessage( "blah blah blah" );
r0.setMatchedDn( new Dn( "dc=example,dc=com" ) );
r1.setMatchedDn( new Dn( "dc=example,dc=com" ) );
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" );
assertTrue( "exact copy should be equal", r0.equals( r1 ) );
assertTrue( "exact copy should be equal", r1.equals( r0 ) );
}