### Question:
Tuple { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Tuple)) return false; Tuple<?, ?> tuple = (Tuple<?, ?>) o; return Objects.equals(getFirst(), tuple.getFirst()) && Objects.equals(getSecond(), tuple.getSecond()); } Tuple(U first, V second); U getFirst(); V getSecond(); @Override boolean equals(Object o); @Override String toString(); @Override int hashCode();  }### Answer:
@Test void test_Tuple_equals() { Tuple same=new Tuple<>("a", "b"); assertTrue(same.equals(same)); assertFalse(same.equals(Integer.valueOf(0))); assertEquals(new Tuple<>("a", "b"), new Tuple<>("a", "b")); assertNotEquals(new Tuple<>("B", "b"), new Tuple<>("a", "b")); assertNotEquals(new Tuple<>("a", "B"), new Tuple<>("a", "b")); }