@Test
public void testMultipleElementAllAsList()
{

    CompletableFuture<String> element1 = new CompletableFuture<>();
    CompletableFuture<String> element2 = new CompletableFuture<>();
    CompletableFuture<List<Object>> future = allAsList(ImmutableList.of(element1, element2));
    assertFalse(future.isDone());
    assertFalse(future.isCancelled());
    element1.complete("a");
    assertFalse(future.isDone());
    assertFalse(future.isCompletedExceptionally());
    assertFalse(future.isCancelled());
    element2.complete("b");
    assertTrue(future.isDone());
    assertFalse(future.isCompletedExceptionally());
    assertFalse(future.isCancelled());
    assertEquals(future.join(), ImmutableList.of("a", "b"));
}