FileCallbackThrottleByTime implements FileCallbackThrottle { @Override public void update(DownloadBatchStatus downloadBatchStatus) { if (callback == null) { Logger.w("A DownloadBatchStatusCallback must be set before an update is called."); return; } this.downloadBatchStatus = downloadBatchStatus; if (!actionScheduler.isScheduled(action)) { actionScheduler.schedule(action); } } FileCallbackThrottleByTime(ActionScheduler actionScheduler); @Override void setCallback(final DownloadBatchStatusCallback callback); @Override void update(DownloadBatchStatus downloadBatchStatus); @Override void stopUpdates();  }
@Test public void doesNothing_whenCallbackIsAbsent() { callbackThrottleByTime.update(downloadBatchStatus); verifyZeroInteractions(actionScheduler, callback, downloadBatchStatus); }