@Override
    public Integer call() throws Exception {
        super.call();

        YamlFlowParser parser = applicationContext.getBean(YamlFlowParser.class);
        Flow flow = parser.parse(file.toFile(), Flow.class);

        GraphCluster graph = GraphUtils.of(flow, null);

        stdOut(Graph2DotService.dot(graph.getGraph()));

        return 0;
    }
@Test
    void run()  {
        URL directory = TemplateValidateCommandTest.class.getClassLoader().getResource("flows/first.yaml");
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        System.setOut(new PrintStream(out));

        try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) {
            String[] args = {
                directory.getPath(),
            };
            Integer call = PicocliRunner.call(FlowDotCommand.class, ctx, args);

            assertThat(call, is(0));
            assertThat(out.toString(), containsString("\"root.date\"[shape=box,label=\"date\"];"));
        }
    }