### Question:
Repeater implements Callable<Boolean> { public Repeater until(Callable<Boolean> exitCondition) { Preconditions.checkNotNull(exitCondition, "exitCondition must not be null"); this.exitCondition = exitCondition; return this; } Repeater();  Repeater(String description); static Repeater create(); static Repeater create(String description); Repeater repeat(); Repeater repeat(Runnable body); Repeater repeat(Callable<?> body); Repeater every(long period, TimeUnit unit); Repeater every(Duration duration); Repeater every(groovy.time.Duration duration); Repeater delayOnIteration(Function<? super Integer,Duration> delayFunction); Repeater backoff(final Duration initialDelay, final double multiplier, @Nullable final Duration finalDelay); Repeater backoffTo(final Duration finalDelay); Repeater until(Callable<Boolean> exitCondition); Repeater until(final T target, final Predicate<T> exitCondition); Repeater rethrowException(); Repeater rethrowExceptionImmediately(); Repeater suppressWarnings(); Repeater limitIterationsTo(int iterationLimit); Repeater limitTimeTo(long deadline, TimeUnit unit); Repeater limitTimeTo(Duration duration); boolean run(); void runRequiringTrue(); ReferenceWithError<Boolean> runKeepingError(); String getDescription(); Duration getTimeLimit(); @Override Boolean call(); static final Duration DEFAULT_REAL_QUICK_PERIOD; }### Answer:
@Test(expectedExceptions = { NullPointerException.class, IllegalArgumentException.class }) public void untilFailsIfClosureIsNull() { new Repeater("untilFailsIfClosureIsNull").until(null); fail("Expected exception was not thrown"); }
@Test public void untilSucceedsIfClosureIsNonNull() { new Repeater("untilSucceedsIfClosureIsNonNull") .until(Callables.returning(true)); }