@Test
public void shouldTriggerBackfillsNew() throws IOException {

  final Workflow workflow = createWorkflow(WORKFLOW_ID1);
  initWorkflow(workflow);
  final int concurrency = BACKFILL_1.concurrency();
  backfills.put(BACKFILL_1.id(), BACKFILL_1);
  backfillTriggerManager.tick();
  final List<Instant> instants = instantsInRange(BACKFILL_1.start(), BACKFILL_1.end(),
      workflow.configuration().schedule())
      .subList(0, concurrency);
  for (Instant instant : instants) {
    verify(triggerListener).event(workflow, Trigger.backfill(BACKFILL_1.id()), instant, TRIGGER_PARAMETERS);
    verify(transaction).store(BACKFILL_1.builder().nextTrigger(nextInstant(instant, BACKFILL_1.schedule())).build());
  }
  verify(transaction, times(concurrency)).store(any(Backfill.class));
}