@Test
public void shouldPrintWorkflow() {

  final Workflow workflow = Workflow.create("foo1", WorkflowConfiguration.builder()
      .id("bar1")
      .schedule(Schedule.DAYS)
      .offset("6h")
      .dockerImage("foo/bar:baz")
      .dockerArgs(List.of("foo", "the", "bar"))
      .dockerTerminationLogging(true)
      .secret(Secret.create("secret-foo", "/foo-secret"))
      .serviceAccount("foo@bar.baz")
      .resources("r1", "r2")
      .env("FOO", "foo", "BAR", "bar")
      .runningTimeout(Duration.parse("PT23H"))
      .commitSha("deadbeef")
      .retryCondition("#tries<2")
      .build());
  final WorkflowState state = WorkflowState.builder()
      .enabled(true)
      .nextNaturalTrigger(OffsetDateTime.of(2018, 1, 2, 3, 4, 5, 6, ZoneOffset.UTC).toInstant())
      .nextNaturalOffsetTrigger(OffsetDateTime.of(2018, 1, 2, 9, 4, 5, 6, ZoneOffset.UTC).toInstant())
      .build();
  cliOutput.printWorkflow(workflow, state);
  assertThat(outContent.toString(), is(
            "Component:             foo1\n"
          + "Workflow:              bar1\n"
          + "Schedule:              DAYS\n"
          + "Offset:                6h\n"
          + "Docker Image:          foo/bar:baz\n"
          + "Docker Arguments:      [foo, the, bar]\n"
          + "Termination Logging:   true\n"
          + "Secret:                secret-foo:/foo-secret\n"
          + "Service Account:       foo@bar.baz\n"
          + "Resources:             [r1, r2]\n"
          + "Environment:           BAR=bar FOO=foo\n"
          + "Timeout:               PT23H\n"
          + "Commit:                deadbeef\n"
          + "Retry Condition:       #tries<2\n"
          + "Enabled:               true\n"
          + "Next Trigger:          2018-01-02T03:04:05.000000006Z\n"
          + "Next Trigger (offset): 2018-01-02T09:04:05.000000006Z\n"));
}