code: public static <T> CompletableFuture<T> getFailedFuture(Throwable throwable) {
  		CompletableFuture<T> failedAttempt = new CompletableFuture<>();
  		failedAttempt.completeExceptionally(throwable);
  		return failedAttempt;
  	}
docs: Returns a {@link CompletableFuture} that has failed with the exception
  provided as argument.
  @param throwable the exception to fail the future with.
  @return The failed future.