@Test
public void testWhenAnyComplete()
        throws Exception
{

    assertGetUncheckedListenable(future -> getFutureValue(whenAnyComplete(ImmutableList.of(SettableFuture.create(), future, SettableFuture.create()))));
    assertFailure(() -> whenAnyComplete(null), e -> assertInstanceOf(e, NullPointerException.class));
    assertFailure(() -> whenAnyComplete(ImmutableList.of()), e -> assertInstanceOf(e, IllegalArgumentException.class));
    assertEquals(
            tryGetFutureValue(whenAnyComplete(ImmutableList.of(SettableFuture.create(), SettableFuture.create())), 10, MILLISECONDS),
            Optional.empty());
}