* other.
*/
@Test
public void testIdentityConsistency() {
// Test 2 CategoryListParams with the default parameter
CategoryListParams clParams1 = new CategoryListParams();
CategoryListParams clParams2 = new CategoryListParams();
assertEquals(
"2 CategoryListParams with the same default term should equal each other.",
clParams1, clParams2);
assertEquals("2 CategoryListParams with the same default term should have the same hashcode",
clParams1.hashCode(), clParams2.hashCode());
// Test 2 CategoryListParams with the same specified Term
clParams1 = new CategoryListParams(new Term("test"));
clParams2 = new CategoryListParams(new Term("test"));
assertEquals(
"2 CategoryListParams with the same term should equal each other.",
clParams1, clParams2);
assertEquals("2 CategoryListParams with the same term should have the same hashcode",
clParams1.hashCode(), clParams2.hashCode());
// Test 2 CategoryListParams with DIFFERENT terms
clParams1 = new CategoryListParams(new Term("test1"));
clParams2 = new CategoryListParams(new Term("test2"));
assertFalse(
"2 CategoryListParams with the different terms should NOT equal each other.",
clParams1.equals(clParams2));
assertFalse(
"2 CategoryListParams with the different terms should NOT have the same hashcode.",
clParams1.hashCode() == clParams2.hashCode());
}