@Test
public void shouldTriggerBackfillsToCompletionReversed() throws IOException {

  final Workflow workflow = createWorkflow(WORKFLOW_ID1);
  initWorkflow(workflow);
  backfills.put(BACKFILL_4.id(), BACKFILL_4);
  backfillTriggerManager.tick();
  var instants = Lists.reverse(instantsInRange(BACKFILL_4.start(), BACKFILL_4.end(), BACKFILL_4.schedule()));
  // Verify all expected instances were triggered in the expected (reversed) order
  for (Instant instant : instants) {
    inOrder(triggerListener).verify(triggerListener)
        .event(workflow, Trigger.backfill(BACKFILL_4.id()), instant, TRIGGER_PARAMETERS);
  }
  // Check that the backfill was marked as completed
  var completedBackfill = BACKFILL_4.builder()
      .nextTrigger(previousInstant(BACKFILL_4.start(), BACKFILL_4.schedule()))
      .allTriggered(true)
      .build();
  verify(transaction).store(completedBackfill);
}