public final static < T > CompletableFuture < List < T > > streamToCompletableFuture ( final Stream < T > stream ) { return CompletableFuture . completedFuture ( stream . collect ( Collectors . toList ( ) ) ) ; }
Create a CompletableFuture containing a List materialized from a Stream