### Question:
ImmutablePair { @Override public int hashCode() { return Objects.hashCode(first, second); } ImmutablePair(A first, B second); static ImmutablePair<A, B> of(A first, B second); A getFirst(); B getSecond(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object o);  }### Answer:
@Test public void testHashCodeConsistency() throws Exception { int hashcode = Fixture.a.hashCode(); Assert.assertEquals(hashcode, Fixture.a.hashCode()); Assert.assertEquals(hashcode, Fixture.a.hashCode()); }
@Test public void testTwoSameObjectHashCode() throws Exception { Assert.assertEquals(Fixture.a.hashCode(), Fixture.d.hashCode()); Assert.assertEquals(Fixture.d.hashCode(), Fixture.e.hashCode()); Assert.assertEquals(Fixture.e.hashCode(), Fixture.a.hashCode()); }
@Test public void testTwoDifferentObjectHashCode() throws Exception { Assert.assertTrue(!(Fixture.a.hashCode() == Fixture.c.hashCode())); }