FixedRateTimerActionScheduler implements ActionScheduler { @Override public boolean isScheduled(Action action) { return actionTimerTasks.containsKey(action); } FixedRateTimerActionScheduler(Timer timer, long frequencyInMillis, Map<Action, TimerTask> actionTimerTasks); @Override void schedule(final Action action); @Override void cancel(Action action); @Override void cancelAll(); @Override boolean isScheduled(Action action);  }
@Test public void returnsTrue_whenActionIsScheduled() { givenScheduledAction(); boolean scheduled = scheduler.isScheduled(anyAction); assertThat(scheduled).isTrue(); }
@Test public void returnsFalse_whenActionIsNotScheduled() { boolean scheduled = scheduler.isScheduled(anyAction); assertThat(scheduled).isFalse(); }