CallbackSchedulerImpl implements CallbackScheduler { @Override public <K> void scheduleCallback(K key, long timestamp, ScheduledCallback<K> callback) { this.epochTimeScheduler.setTimer(key, timestamp, callback); } CallbackSchedulerImpl(EpochTimeScheduler epochTimeScheduler); @Override void scheduleCallback(K key, long timestamp, ScheduledCallback<K> callback); @Override void deleteCallback(K key);  }
@Test public void testScheduleCallback() { @SuppressWarnings("unchecked") ScheduledCallback<String> stringCallback = mock(ScheduledCallback.class); scheduler.scheduleCallback("string_key", 123, stringCallback); verify(epochTimeScheduler).setTimer("string_key", 123, stringCallback); @SuppressWarnings("unchecked") ScheduledCallback<Integer> intCallback = mock(ScheduledCallback.class); scheduler.scheduleCallback(777, 456, intCallback); verify(epochTimeScheduler).setTimer(777, 456, intCallback); }