code: public static <T> CompletableFuture<T> exceptionallyExpecting(CompletableFuture<T> future, Predicate<Throwable> isExpected, T exceptionValue) {
          return future.exceptionally(ex -> {
              if (isExpected.test(Exceptions.unwrap(ex))) {
                  return exceptionValue;
              }
              throw new CompletionException(ex);
          });
      }
docs: Same as CompletableFuture.exceptionally(), except that it allows certain exceptions, as defined by the isExpected parameter.
  If such an exception is caught, the given exceptionValue is then returned. All other Exceptions will be re-thrown.
  
  @param future         The original CompletableFuture to attach to.
  @param isExpected     A Predicate that can check whether an Exception is expected or not.
  @param exceptionValue The value to return in case the thrown Exception if of type exceptionClass.
  @param <T>            The Type of the Future's result.
  @return A new CompletableFuture that will complete either:
  - With the same result as the original Future if that one completed normally
  - With exceptionValue if the original Future completed with an expected exception.
  - Exceptionally with the original Future's exception if none of the above are true.