ClassPKInfoItemIdentifier extends BaseInfoItemIdentifier { @Override public int hashCode() { return Objects.hash(_classPK); } ClassPKInfoItemIdentifier(long classPK); @Override boolean equals(Object object); long getClassPK(); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCode() { ClassPKInfoItemIdentifier classPKInfoItemIdentifier1 = new ClassPKInfoItemIdentifier(12345L); ClassPKInfoItemIdentifier classPKInfoItemIdentifier2 = new ClassPKInfoItemIdentifier(12345L); Assert.assertEquals( classPKInfoItemIdentifier1.hashCode(), classPKInfoItemIdentifier2.hashCode()); }
@Test public void testHashCodeWithDifferentClassPK() { ClassPKInfoItemIdentifier classPKInfoItemIdentifier1 = new ClassPKInfoItemIdentifier(12345L); ClassPKInfoItemIdentifier classPKInfoItemIdentifier2 = new ClassPKInfoItemIdentifier(22345L); Assert.assertNotEquals( classPKInfoItemIdentifier1.hashCode(), classPKInfoItemIdentifier2.hashCode()); }