Pair { public static <A, B> Pair<A, B> of(A a, B b) { return new Pair<>(a, b); } private  Pair(A _1, B _2); static Pair<A, B> of(A a, B b); Tuple3<T, A, B> prepend(T t); Tuple3<A, B, T> extend(BiFunction<A, B, T> mapping); Pair<A1, B1> map(Function<A,A1> fa, Function<B,B1> fb); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); final A _1; final B _2; }
@Test public void shouldNotBeEqualToUnrelatedClass() { assertThat(Pair.of(1, 2)).isNotEqualTo(""); }