docs: @SuppressWarnings("unchecked")
    static <R> BiPredicate<R, Throwable> failurePredicateFor(Predicate<? extends Throwable> failurePredicate) {
      return (t, u) -> u != null && ((Predicate<Throwable>) failurePredicate).test(u);
    }