### Question:
CompletableFutureUtils { public static <T> CompletableFuture<T> successful(final T object) { return CompletableFuture.completedFuture(object); } private  CompletableFutureUtils(); static CompletableFuture<T> successful(final T object); static CompletableFuture<T> exceptionallyCompletedFuture(final Throwable e); static CompletableFuture<T> failed(final Throwable e); static void transferResult(final CompletionStage<T> source,
                                          final CompletableFuture<T> target); static CompletionStage<T> onFailure(final CompletionStage<T> future, final Consumer<? super Throwable> consumer); static CompletionStage<T> onSuccess(final CompletionStage<T> future, final Consumer<? super T> consumer); static CompletionStage<T> recover(final CompletionStage<T> future, final Function<Throwable, ? extends T> f); static CompletableFuture<T> recoverWith(final CompletionStage<T> future, final Function<? super Throwable, CompletionStage<T>> f); static CompletableFuture<T> recoverWith(final CompletionStage<T> future, final Function<? super Throwable, CompletionStage<T>> f, final Executor executor); static T orElseThrow(final CompletionStage<T> stage, Supplier<? extends X> exceptionSupplier); static T orElseGet(final CompletionStage<T> stage, final Supplier<T> other); static CompletionStage<U> map(final CompletionStage<T> future, final Function<? super T,? extends U> f); static CompletionStage<U> flatMap(final CompletionStage<T> future, final Function<? super T, CompletionStage<U>> f); static CompletableFuture<List<T>> listOfFuturesToFutureOfList(final List<? extends CompletionStage<T>> list); static CompletableFuture<List<T>> sequence(final List<? extends CompletionStage<T>> list);  }### Answer:
@Test public void testSuccessful() throws Exception { final CompletableFuture<String> future = successful("hello"); assertThat(future.join()).isEqualTo("hello"); }
@Test public void recoverWithSuccessInFirst() throws Exception { final String actual = recoverWithTestWithSuccessfulResult(successful("hello"), successful("hi")); assertThat(actual).isEqualTo("hello"); }