@Test
public void testComposeTry2() {

    final List<Exception> collectedErrors = new ArrayList<>();
    final Fun.ThrowingBiFunction<String, Integer, Integer> function = (key, newValue) -> {
        if (newValue % 3 == 0) {
            throw new Exception("multiples of three are disallowed");
        }
        return newValue;
    };
    Integer[] ints = Stream.generate(new AtomicInteger(0)::incrementAndGet).limit(10)
            .map(zipValuesWithKeyFunc(String::valueOf))
            .flatMap(mapEntry(composeTry2(Stream::of, Stream::empty, function,
                    (entry, error) -> collectedErrors.add(error))))
            .toArray(Integer[]::new);
    assertEquals("collected three errors", 3, collectedErrors.size());
}