@Test
void scheduleFixedRateTask() {

    Duration rate = Duration.ofHours(1);
    scheduler.schedule(new FixedRateTask("hourly-job", null, rate));
    ArgumentCaptor<Runnable> scheduledTask = ArgumentCaptor.forClass(Runnable.class);
    verify(schedulerExecutor).scheduleAtFixedRate(scheduledTask.capture(), anyLong(), eq(rate.toNanos()), eq(TimeUnit.NANOSECONDS));
    scheduledTask.getValue().run();
    verify(jobExecutor).submit((Callable<?>) any(Callable.class));
}