### Question:
ArchiveIdentifierVersion extends ArchiveIdentifier { @Override public int hashCode() { return Objects.hash(super.hashCode(), getVersion()); } ArchiveIdentifierVersion(final ArchiveType archiveType, final String name, final String version); final String getVersion(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testHashCodeDifferentArchiveType() { final ArchiveIdentifierVersion ai1 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "abc", "1.0"); final ArchiveIdentifierVersion ai2 = new ArchiveIdentifierVersion(ArchiveType.JAVASCRIPT, "abc", "1.0"); Assert.assertNotEquals("hashCode()", ai1.hashCode(), ai2.hashCode()); }
@Test public void testHashCodeDifferentName() { final ArchiveIdentifierVersion ai1 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "abc", "1.0"); final ArchiveIdentifierVersion ai2 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "def", "1.0"); Assert.assertNotEquals("hashCode()", ai1.hashCode(), ai2.hashCode()); }
@Test public void testHashCodeDifferentVersion() { final ArchiveIdentifierVersion ai1 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "abc", "1.0"); final ArchiveIdentifierVersion ai2 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "abc", "2.0"); Assert.assertNotEquals("hashCode()", ai1.hashCode(), ai2.hashCode()); }
@Test public void testHashCodeSame() { final ArchiveIdentifierVersion ai1 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "abc", "1.0"); final ArchiveIdentifierVersion ai2 = new ArchiveIdentifierVersion(ArchiveType.JAVA, "abc", "1.0"); Assert.assertEquals("hashCode()", ai1.hashCode(), ai2.hashCode()); }