@Test public void mapT3() { Tuple3<Integer, Integer, String> base = Tuples.of(100, 200, "Foo"); Tuple2<?,?> mapped = base.mapT3(String::length); assertThat(mapped).isNotSameAs(base) .hasSize(3) .containsExactly(base.getT1(), base.getT2(), 3); }
@Test public void mapT3Null() { assertThatNullPointerException().isThrownBy(() -> Tuples.of(1, 2, 3) .mapT3(i -> null) ).withMessage("t3"); }