GroupKeyInfoItemIdentifier extends BaseInfoItemIdentifier { @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof GroupKeyInfoItemIdentifier)) { return false; } GroupKeyInfoItemIdentifier groupKeyInfoItemIdentifier = (GroupKeyInfoItemIdentifier)object; if (Objects.equals(_groupId, groupKeyInfoItemIdentifier._groupId) && Objects.equals(_key, groupKeyInfoItemIdentifier._key)) { return true; } return false; } GroupKeyInfoItemIdentifier(long groupId, String key); @Override boolean equals(Object object); long getGroupId(); String getKey(); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { GroupKeyInfoItemIdentifier groupKeyInfoItemIdentifier1 = new GroupKeyInfoItemIdentifier(12345L, "key"); GroupKeyInfoItemIdentifier groupKeyInfoItemIdentifier2 = new GroupKeyInfoItemIdentifier(12345L, "key"); Assert.assertEquals( groupKeyInfoItemIdentifier1, groupKeyInfoItemIdentifier2); }