### Question:
RobustJobSchedulerWrapper { public JobHandle schedule( Group group, long delayMillis, ThrowingAction<Exception> action ) { return delegate.schedule( group, () -> withErrorHandling( action ), delayMillis, MILLISECONDS ); } RobustJobSchedulerWrapper( JobScheduler delegate, Log log ); JobHandle schedule( Group group, long delayMillis, ThrowingAction<Exception> action ); JobHandle scheduleRecurring( Group group, long periodMillis, ThrowingAction<Exception> action );  }### Answer:
@Test public void oneOffJobWithExceptionShouldLog() throws Exception { Log log = mock( Log.class ); RobustJobSchedulerWrapper robustWrapper = new RobustJobSchedulerWrapper( actualScheduler, log ); AtomicInteger count = new AtomicInteger(); IllegalStateException e = new IllegalStateException(); JobHandle jobHandle = robustWrapper.schedule( Group.HZ_TOPOLOGY_HEALTH, 100, () -> { count.incrementAndGet(); throw e; } ); assertEventually( "run count", count::get, Matchers.equalTo( 1 ), DEFAULT_TIMEOUT_MS, MILLISECONDS ); jobHandle.waitTermination(); verify( log, timeout( DEFAULT_TIMEOUT_MS ).times( 1 ) ).warn( "Uncaught exception", e ); }