@Test
public void testBackfillCreate() {

  final String component = "quux";
  final String start = "2017-01-01T00:00:00Z";
  final String end = "2017-01-30T00:00:00Z";
  final Backfill backfill = Backfill.newBuilder()
      .id("backfill-2")
      .start(Instant.parse(start))
      .end(Instant.parse(end))
      .workflowId(WorkflowId.create(component, "foo"))
      .concurrency(1)
      .nextTrigger(Instant.parse("2017-01-01T00:00:00Z"))
      .schedule(Schedule.DAYS)
      .created(currentTime)
      .lastModified(currentTime)
      .build();
  final BackfillInput expectedInput = BackfillInput.newBuilder()
      .component(backfill.workflowId().componentId())
      .workflow(backfill.workflowId().id())
      .start(backfill.start())
      .end(backfill.end())
      .reverse(backfill.reverse())
      .concurrency(backfill.concurrency())
      .triggerParameters(TriggerParameters.zero())
      .build();
  when(client.backfillCreate(expectedInput, false))
      .thenReturn(CompletableFuture.completedFuture(backfill));
  CliMain.run(cliContext, "backfill", "create", component, "foo", "2017-01-01", "2017-01-30",
      "1");
  verify(client).backfillCreate(expectedInput, false);
  verify(cliOutput).printBackfill(backfill, true);
}