CompletableFuture.completedFuture() returns a CompletedFuture
that is already completed with the given value.
How do we construct a CompletableFuture
that is already completed exceptionally?
Meaning, instead of returning a value I want the future to throw an exception.
See Question&Answers more detail:os