@Test
void testException() {

    final AtomicBoolean fClosed = new AtomicBoolean();
    boolean gotException = false;
    final Stream<String> f = Stream.of("F").peek(this::produceException).onClose(() -> fClosed.set(true));
    List<String> result;
    try {
        result = StreamComposition.concatAndAutoClose(a, b, f, c).collect(toList());
    } catch (Exception e) {
        gotException = true;
    }
    assertTrue(gotException);
    assertAllClosed();
    assertTrue(fClosed.get());
}