* Test method for equals()
*/
@Test
public void testEqualsObject() throws LdapException
{
Entry entry1 = new DefaultEntry();
Entry entry2 = new DefaultEntry();
assertEquals( entry1, entry2 );
entry1.setDn( EXAMPLE_DN );
assertNotSame( entry1, entry2 );
entry2.setDn( EXAMPLE_DN );
assertEquals( entry1, entry2 );
Attribute attrOC = new DefaultAttribute( "objectClass", "top", "person" );
Attribute attrCN = new DefaultAttribute( "cn", "test1", "test2" );
Attribute attrSN = new DefaultAttribute( "sn", "Test1", "Test2" );
Attribute attrPWD = new DefaultAttribute( "userPassword", BYTES1, BYTES2 );
entry1.put( attrOC, attrCN, attrSN, attrPWD );
entry2.put( attrOC, attrCN, attrSN );
assertNotSame( entry1, entry2 );
entry2.put( attrPWD );
assertEquals( entry1, entry2 );
Attribute attrL1 = new DefaultAttribute( "l", "Paris", "New-York" );
Attribute attrL2 = new DefaultAttribute( "l", "Paris", "Tokyo" );
entry1.put( attrL1 );
entry2.put( attrL1 );
assertEquals( entry1, entry2 );
entry1.add( "l", "London" );
assertNotSame( entry1, entry2 );
entry2.add( attrL2 );
assertNotSame( entry1, entry2 );
entry1.clear();
entry2.clear();
assertEquals( entry1, entry2 );
}