CompletionStage Support
Failsafe can accept a CompletionStage and return a new CompletableFuture with failure handling built-in:
Failsafe.with(retryPolicy)
.getStageAsync(this::connectAsync)
.thenApplyAsync(value -> value + "bar")
.thenAccept(System.out::println));