### Question:
ImmutablePair { @Override public boolean equals(Object o) { if (o == null) { return false; } if (!(o instanceof ImmutablePair)) { return false; } ImmutablePair<?, ?> other = (ImmutablePair<?, ?>) o; return Objects.equal(first, other.first) && Objects.equal(second, other.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 testSelf() throws Exception { Assert.assertTrue(Fixture.a.equals(Fixture.a)); Assert.assertTrue(Fixture.b.equals(Fixture.b)); Assert.assertTrue(Fixture.c.equals(Fixture.c)); }
@Test public void testIncompatibleTypes() throws Exception { Assert.assertFalse(Fixture.a.equals(Fixture.c)); Assert.assertFalse(Fixture.a.equals(Fixture.b)); }
@Test public void testNullReferences() throws Exception { Assert.assertFalse(Fixture.a.equals(null)); }
@Test public void testEqualsIsReflexive() { Assert.assertTrue(Fixture.a.equals(Fixture.d)); }
@Test public void testEqualsIsTransitive() { Assert.assertTrue(Fixture.a.equals(Fixture.d)); Assert.assertTrue(Fixture.d.equals(Fixture.e)); Assert.assertTrue(Fixture.e.equals(Fixture.a)); }
@Test public void testEqualsTypeSafe() { ImmutablePair<Integer, Boolean> pair1 = new ImmutablePair<>(1, true); ImmutablePair<String, byte[]> pair2 = new ImmutablePair<>("1", "true".getBytes()); Assert.assertFalse(pair1.equals(pair2)); Assert.assertFalse(pair2.equals(pair1)); Assert.assertFalse(pair1.equals(new Integer(10))); }