### Question:
ScheduledRunnable implements Runnable, Cancellable { public void scheduleWithFixedDelay(ScheduledExecutorService scheduledExecutor, long period, TimeUnit unit) { scheduleWithFixedDelay(scheduledExecutor, 0, period, unit); }  void scheduleWithFixedDelay(ScheduledExecutorService scheduledExecutor, long period,
            TimeUnit unit); void scheduleWithFixedDelay(ScheduledExecutorService scheduledExecutor,
            long initialDelay, long period, TimeUnit unit); @Override void run(); @Override void cancel();  }### Answer:
@Test public void testScheduleWithFixedDelay() { TestScheduledRunnable testScheduledRunnable = new TestScheduledRunnable(); testScheduledRunnable.scheduleWithFixedDelay(scheduledExecutorService, 1, SECONDS); verify(scheduledExecutorService).scheduleWithFixedDelay(testScheduledRunnable, 0, 1, SECONDS); verifyNoMoreInteractions(scheduledExecutorService); }
@Test public void testScheduleWithFixedDelayCalledTwice() { TestScheduledRunnable testScheduledRunnable = new TestScheduledRunnable(); testScheduledRunnable.scheduleWithFixedDelay(scheduledExecutorService, 1, SECONDS); testScheduledRunnable.scheduleWithFixedDelay(scheduledExecutorService, 1, SECONDS); verify(scheduledExecutorService).scheduleWithFixedDelay(testScheduledRunnable, 0, 1, SECONDS); verifyNoMoreInteractions(scheduledExecutorService); }