### Question:
Pair implements Serializable { @Override public String toString() { return first + "," + second; } Pair(A first, B second); A getFirst(); B getSecond(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void testToString() { assertEquals("3.0,foo", new Pair<>(3.0, "foo").toString()); }