@Test
public void shouldPrintWorkflow() throws IOException {

  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")
      .commitSha("deadbeef")
      .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(OBJECT_MAPPER.readValue(outContent.toString(), WorkflowWithState.class),
      is(WorkflowWithState.create(workflow, state)));
}