@Test
public void testDispatchOverdue_scanForOverdueFailure() throws Exception {

  DyneinJobSpec jobSpec = getTestJobSpec(validToken, "test8");
  Schedule schedule = getSchedule(jobSpec, false);
  String partition = "failure1";
  CompletableFuture<SchedulesQueryResponse> response = new CompletableFuture<>();
  response.completeExceptionally(new Exception());
  when(scheduleManager.getOverdueJobs(partition)).thenReturn(response);
  CompletableFuture<Boolean> ret = worker.dispatchOverdue(partition);
  ret.get(1000, TimeUnit.MILLISECONDS);
  verify(scheduleManager, times(1)).getOverdueJobs(partition);
  verifyNoMoreInteractions(scheduleManager, asyncClient);
}