public function renderDot(StateCollection $stateCollection)
    {
        // define the graph
        $graph = 'digraph ' . 'test'
            . ' { dpi="56";compound="true";fontname="Arial";margin="";nodesep="0.6";rankdir="TD";ranksep="0.4";'
            . PHP_EOL;

        // add all states to the graph
        foreach ($stateCollection as $state) {
            $nodeRenderer = $this->getNodeRendererByStateName($state->getKey());
            $graph .= ' ' . $nodeRenderer->render($state);
        }

        // add all transitions to the graph
        foreach ($stateCollection as $state) {
            $nodeRenderer = $this->getTransitionRendererByStateName($state->getKey());
            $graph .= ' ' . $nodeRenderer->render($state);
        }

        $graph .= '}' . PHP_EOL;


        return $graph;
    }