* Test method for hashcode()
*/
@Test
public void testHashCode() throws LdapException, LdapException
{
Entry entry1 = new DefaultEntry( EXAMPLE_DN );
Entry entry2 = new DefaultEntry( EXAMPLE_DN );
assertEquals( entry1.hashCode(), entry2.hashCode() );
entry2.setDn( new Dn( "ou=system,dc=com" ) );
assertNotSame( entry1.hashCode(), entry2.hashCode() );
entry2.setDn( EXAMPLE_DN );
assertEquals( entry1.hashCode(), entry2.hashCode() );
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.add( attrOC, attrCN, attrSN, attrPWD );
entry2.add( attrOC, attrCN, attrSN, attrPWD );
assertEquals( entry1.hashCode(), entry2.hashCode() );
Entry entry3 = new DefaultEntry( EXAMPLE_DN );
entry3.add( attrOC, attrSN, attrCN, attrPWD );
assertEquals( entry1.hashCode(), entry3.hashCode() );
}