@Test
    public void testCloseStreamConcat() {
        AtomicBoolean closed1 = new AtomicBoolean();
        AtomicBoolean closed2 = new AtomicBoolean();
            
        Stream s1 = Stream.of(1, 2).onClose(() -> closed1.set(true));
        Stream s2 = Stream.of(3).onClose(() -> closed2.set(true));
        
        try (Stream s3 = Stream.concat(s1, s2)) {
            s3.collect(Collectors.toList());
        }
        
        assertTrue(closed1.get());
        assertTrue(closed2.get());
    }
@author Lukas Eder
@author Roman Tkalenko
jOOL/src/test/java/org/jooq/lambda/SeqTest.java