### Question:
ExceptionPlan { public <E extends Throwable> Maybe<Execution<T>, E> execute(E exception) { requireNonNull(exception); List<Rule<T>> remainingRules = new ArrayList<>(); Rule<T> applicable = null; for (Rule<T> rule : rules) { if (applicable == null && rule.appliesTo(exception)) { applicable = rule; remainingRules.add(rule.remaining()); } else { remainingRules.add(rule); } } if (applicable == null) return Maybe.except(exception); return applicable.currentStrategy() .map(s -> new Execution<>(s, new ExceptionPlan<>(remainingRules))) .map(Maybe::<Execution<T>, E>of) .orElse(Maybe.except(exception)); } ExceptionPlan(); private  ExceptionPlan(List<Rule<T>> rules); ExceptionPlan<T> upon(
      Predicate<? super Throwable> condition, List<? extends T> strategies); ExceptionPlan<T> upon(
      Class<? extends Throwable> exceptionType, List<? extends T> strategies); ExceptionPlan<T> upon(
      Class<E> exceptionType, Predicate<? super E> condition, List<? extends T> strategies); Maybe<Execution<T>, E> execute(E exception); boolean covers(Throwable exception);  }### Answer:
@Test public void emptyPlan_errorPropagation() { ExceptionPlan<String> plan = new ExceptionPlan<>(); MyError error = new MyError(); Maybe<ExceptionPlan.Execution<String>, MyError> maybe = plan.execute(error); assertSame(error, assertThrows(MyError.class, () -> maybe.orElseThrow(e -> e))); }
@Test public void emptyPlan_uncheckedPropagation() { ExceptionPlan<String> plan = new ExceptionPlan<>(); RuntimeException exception = new RuntimeException("test"); Maybe<ExceptionPlan.Execution<String>, RuntimeException> maybe = plan.execute(exception); assertSame(exception, assertThrows(RuntimeException.class, () -> maybe.orElseThrow(e -> e))); }
@Test public void emptyPlan_checkedPropagation() { ExceptionPlan<String> plan = new ExceptionPlan<>(); Exception exception = new Exception("test"); Maybe<ExceptionPlan.Execution<String>, Exception> maybe = plan.execute(exception); assertSame(exception, assertThrows(Exception.class, () -> maybe.orElseThrow(e -> e))); }