@Test
public void updateExecutionsUpdateCallFails() throws Exception {

  mockUpdateCallFails();
  when(this.executorLoader.fetchExecutor(anyInt())).thenReturn(this.activeExecutor);
  DateTimeUtils.setCurrentMillisFixed(System.currentTimeMillis());
  for (int i = 0; i < this.updater.numErrorsBeforeUnresponsiveEmail; i++) {
    this.updater.updateExecutions();
    DateTimeUtils.setCurrentMillisFixed(
        DateTimeUtils.currentTimeMillis() + this.updater.errorThreshold + 1L);
  }
  verify(this.mailAlerter).alertOnFailedUpdate(
      this.activeExecutor, Collections.singletonList(this.execution), API_CALL_EXCEPTION);
  verifyZeroInteractions(this.executionFinalizer);
}