JsonCliOutput implements CliOutput { @Override public void printWorkflows(List<Workflow> workflows) { printJson(workflows); }  @Override void printStates(RunStateDataPayload runStateDataPayload); @Override void printEvents(List<EventInfo> eventInfos); @Override void printBackfill(Backfill backfill, boolean ignored); @Override void printBackfillPayload(BackfillPayload backfillPayload, boolean ignored); @Override void printBackfills(List<BackfillPayload> backfills, boolean ignored); @Override void printResources(List<Resource> resources); @Override void printMessage(String message); @Override void printWorkflow(Workflow workflow, WorkflowState state); @Override void printWorkflows(List<Workflow> workflows); @Override void printError(String message);  }
@Test public void shouldPrintWorkflows() throws IOException { final Workflow foo1 = Workflow.create("foo1", WorkflowConfiguration.builder() .id("bar1") .schedule(Schedule.DAYS) .build()); final Workflow foo2 = Workflow.create("foo2", WorkflowConfiguration.builder() .id("bar2") .schedule(Schedule.DAYS) .build()); final List<Workflow> workflows = List.of(foo1, foo2); cliOutput.printWorkflows(workflows); assertThat(OBJECT_MAPPER.readValue(outContent.toString(), new TypeReference<List<Workflow>>() { }), is(workflows)); }