public static boolean allDone(Collection<Future<?>> futures) {
        for (Future<?> f : futures) {
            if (!f.isDone()) {
                return false;
            }
        }
        return true;
    }
@Test
    public void testAllDone_whenAllFuturesCompleted() {
        Collection<Future<?>> futures = Arrays.asList(InternalCompletableFuture.newCompletedFuture(null));
        assertTrue(FutureUtil.allDone(futures));

        futures = Arrays.asList(new UncancellableFuture<>());
        assertFalse(FutureUtil.allDone(futures));
    }