public static FlowGraph of(GraphCluster graph) throws IllegalVariableEvaluationException {
        return FlowGraph.builder()
            .nodes(GraphUtils.nodes(graph))
            .edges(GraphUtils.edges(graph))
            .clusters(GraphUtils.clusters(graph, new ArrayList<>())
                .stream()
                .map(g -> new Cluster(g.getKey(), g.getKey().getGraph()
                    .nodes()
                    .stream()
                    .map(AbstractGraph::getUid)
                    .toList(),
                    g.getValue(),
                    g.getKey().getRoot().getUid(),
                    g.getKey().getEnd().getUid()
                ))
                .toList()
            )
            .build();
    }
@Test
    void trigger() throws IllegalVariableEvaluationException {
        Flow flow = this.parse("flows/valids/trigger-flow-listener.yaml");
        triggerRepositoryInterface.save(
            Trigger.of(flow, flow.getTriggers().getFirst()).toBuilder().disabled(true).build()
        );

        FlowGraph flowGraph = graphService.flowGraph(flow, null);

        assertThat(flowGraph.getNodes().size(), is(6));
        assertThat(flowGraph.getEdges().size(), is(5));
        assertThat(flowGraph.getClusters().size(), is(1));
        AbstractGraph triggerGraph = flowGraph.getNodes().stream().filter(e -> e instanceof GraphTrigger).findFirst().orElseThrow();
        assertThat(((GraphTrigger) triggerGraph).getTrigger().getDisabled(), is(true));
    }