### Question:
Triple { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Triple<?, ?, ?> triple = (Triple<?, ?, ?>) o; return Objects.equals(first, triple.first) && Objects.equals(second, triple.second) && Objects.equals(third, triple.third); } Triple(A first, B second, C third); A first(); B second(); C third(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void testEquals() { Triple tripleA = new Triple(1, "cold", "beer"); Triple tripleB = new Triple(1, "cold", "beer"); Triple tripleC = new Triple(1, "warm", "beer"); assertEquals(tripleA, tripleB); assertEquals(tripleB, tripleA); assertNotEquals(tripleA, tripleC); assertNotEquals(tripleC, tripleA); }