@Test
public void testAll() throws Exception {

    FuturePool<Integer> pool = new FuturePool<>();
    long start = System.currentTimeMillis();
    pool.listen(delayed(40, 3));
    pool.listen(delayed(10, 2));
    Set<Integer> result = pool.all().await();
    long end = System.currentTimeMillis();
    long duration = end - start;
    assertEquals(2, result.size());
    assertTrue(result.contains(2));
    assertTrue(result.contains(3));
    assertTrue(duration >= 40);
}