use of org.apache.directory.api.ldap.model.message.SearchResultEntryImpl in project directory-ldap-api by apache.
the class SearchResultEntryImplTest method testHashCodeExactCopy.
/**
* Tests for equal hashCode when an exact copy is compared.
*/
@Test
public void testHashCodeExactCopy() throws LdapException {
SearchResultEntryImpl resp0 = new SearchResultEntryImpl(5);
resp0.setEntry(getEntry());
resp0.setObjectName(new Dn("dc=example,dc=com"));
SearchResultEntryImpl resp1 = new SearchResultEntryImpl(5);
resp1.setEntry(getEntry());
resp1.setObjectName(new Dn("dc=example,dc=com"));
assertTrue(resp0.hashCode() == resp1.hashCode());
}
Aggregations