@Test
public void shouldStoreWorkflowWithNextNaturalTrigger() throws Exception {

  var instant = Instant.parse("2016-03-14T14:00:00Z");
  var offset = instant.plus(1, ChronoUnit.DAYS);
  var spec = TriggerInstantSpec.create(instant, offset);
  var workflow = Workflow.create("test", FULL_WORKFLOW_CONFIGURATION);
  storage.runInTransactionWithRetries(tx -> {
    tx.storeWorkflowWithNextNaturalTrigger(workflow, spec);
    return null;
  });
  var workflows = storage.workflowsWithNextNaturalTrigger();
  assertThat(workflows.values().size(), is(1));
  assertThat(workflows, hasEntry(workflow, spec));
}