code: @SuppressWarnings("unchecked")
    public static <R> FailsafeExecutor<R> with(List<? extends Policy<R>> policies) {
      return new FailsafeExecutor<>((List<Policy<R>>) Assert.notNull(policies, "policies"));
    }
docs: Creates and returns a new {@link FailsafeExecutor} instance that will handle failures according to the given {@code
  policies}. The {@code policies} are composed around an execution and will handle execution results in reverse, with
  the last policy being applied first. For example, consider:
  <p>
  <pre>
  Failsafe.with(fallback, retryPolicy, circuitBreaker).get(supplier);
  </pre>
  </p>
  This results in the following internal composition when executing the {@code supplier} and handling its result:
  <p>
  <pre>
  Fallback(RetryPolicy(CircuitBreaker(Supplier)))
  </pre>
  </p>
  This means the {@code CircuitBreaker} is first to evaluate the {@code Supplier}'s result, then the {@code
  RetryPolicy}, then the {@code Fallback}. Each policy makes its own determination as to whether the result
  represents a failure. This allows different policies to be used for handling different types of failures.
  
  @param <R> result type
  @param <P> policy type
  @throws NullPointerException if {@code policies} is null
  @throws IllegalArgumentException if {@code policies} is empty