### Question:
Futures { @SafeVarargs public static <V> Future<List<V>> combine( final Future<? extends V>... futures ) { return combine( Arrays.asList( futures ) ); } private  Futures(); @SafeVarargs static Future<List<V>> combine( final Future<? extends V>... futures ); static Future<List<V>> combine( final Iterable<? extends Future<? extends V>> futures ); static CompletableFuture<T> failedFuture( Throwable ex );  }### Answer:
@Test void combinedFutureShouldGetResultsAfterAllComplete() throws Exception { FutureTask<String> task1 = new FutureTask<>( NOOP, "1" ); FutureTask<String> task2 = new FutureTask<>( NOOP, "2" ); FutureTask<String> task3 = new FutureTask<>( NOOP, "3" ); Future<List<String>> combined = Futures.combine( task1, task2, task3 ); assertThrows( TimeoutException.class, () -> combined.get( 10, TimeUnit.MILLISECONDS ) ); task3.run(); task2.run(); assertThrows( TimeoutException.class, () -> combined.get( 10, TimeUnit.MILLISECONDS ) ); task1.run(); List<String> result = combined.get(); assertThat( result, contains( "1", "2", "3" ) ); }