public static <T>CompletableFuture<T> exceptionallyCompletedFuture(Throwable throwable){
  final CompletableFuture<T> future=new CompletableFuture<T>();
  future.completeExceptionally(throwable);
  return future;
}

public static < T > CompletableFuture < T > exceptionallyCompletedFuture ( Throwable throwable ) { final CompletableFuture < T > future = new CompletableFuture < T > ( ) ; future . completeExceptionally ( throwable ) ; return future ; }
returns a new completablefuture that is already exceptionally completed with the given exception .
