@Test public void mapT4Null() { assertThatNullPointerException().isThrownBy(() -> Tuples.of(1, 2, 3, 4) .mapT4(i -> null) ).withMessage("t4"); }
@Test public void mapT4() { Tuple4<Integer, Integer, Integer, String> base = Tuples.of(100, 200, 300, "Foo"); Tuple2<?,?> mapped = base.mapT4(String::length); assertThat(mapped).isNotSameAs(base) .hasSize(4) .containsExactly(base.getT1(), base.getT2(), base.getT3(), 3); }