### Question:
Retryer { public final <E extends Throwable> Retryer upon( Class<E> exceptionType, List<? extends Delay<? super E>> delays) { return new Retryer(plan.upon(rejectInterruptedException(exceptionType), delays)); } Retryer(); private  Retryer(ExceptionPlan<Delay<?>> plan); final Retryer upon(
      Class<E> exceptionType, List<? extends Delay<? super E>> delays); final Retryer upon(
      Class<E> exceptionType, Stream<? extends Delay<? super E>> delays); Retryer upon(
      Class<E> exceptionType, Predicate<? super E> condition,
      List<? extends Delay<? super E>> delays); Retryer upon(
      Class<E> exceptionType, Predicate<? super E> condition,
      Stream<? extends Delay<? super E>> delays); T retryBlockingly(CheckedSupplier<T, E> supplier); CompletionStage<T> retry(
      CheckedSupplier<T, ?> supplier, ScheduledExecutorService executor); CompletionStage<T> retryAsync(
      CheckedSupplier<? extends CompletionStage<T>, ?> asyncSupplier,
      ScheduledExecutorService executor); ForReturnValue<T> ifReturns(
      Predicate<T> condition, List<? extends Delay<? super T>> delays); ForReturnValue<T> ifReturns(
      Predicate<T> condition, Stream<? extends Delay<? super T>> delays); ForReturnValue<T> uponReturn(
      T returnValue, Stream<? extends Delay<? super T>> delays); ForReturnValue<T> uponReturn(
      T returnValue, List<? extends Delay<? super T>> delays);  }### Answer:
@Test public void cannotRetryOnInterruptedException() { assertThrows(IllegalArgumentException.class, () -> upon(InterruptedException.class, asList())); assertThrows( IllegalArgumentException.class, () -> retryer.upon(InterruptedException.class, e -> false, asList())); }
@Test public void cannotRetryOnSubtypeOfInterruptedException() { @SuppressWarnings("serial") class MyInterruptedException extends InterruptedException {} assertThrows( IllegalArgumentException.class, () -> upon(MyInterruptedException.class, asList())); assertThrows( IllegalArgumentException.class, () -> retryer.upon(MyInterruptedException.class, e -> false, asList())); }