protected function loadRootNodeListener(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Testwork\Output\Node\EventListener\ChainEventListener', array(
            array(
                new Definition('Behat\Behat\Output\Node\EventListener\AST\SuiteListener', array(
                    new Reference('output.node.printer.pretty.suite_setup')
                )),
                new Definition('Behat\Behat\Output\Node\EventListener\AST\FeatureListener', array(
                    new Reference('output.node.printer.pretty.feature'),
                    new Reference('output.node.printer.pretty.feature_setup')
                )),
                $this->proxySiblingEvents(
                    BackgroundTested::BEFORE,
                    BackgroundTested::AFTER,
                    array(
                        new Definition('Behat\Behat\Output\Node\EventListener\AST\ScenarioNodeListener', array(
                            BackgroundTested::AFTER_SETUP,
                            BackgroundTested::AFTER,
                            new Reference('output.node.printer.pretty.scenario')
                        )),
                        new Definition('Behat\Behat\Output\Node\EventListener\AST\StepListener', array(
                            new Reference('output.node.printer.pretty.step'),
                            new Reference('output.node.printer.pretty.step_setup')
                        )),
                    )
                ),
                $this->proxySiblingEvents(
                    ScenarioTested::BEFORE,
                    ScenarioTested::AFTER,
                    array(
                        new Definition('Behat\Behat\Output\Node\EventListener\AST\ScenarioNodeListener', array(
                            ScenarioTested::AFTER_SETUP,
                            ScenarioTested::AFTER,
                            new Reference('output.node.printer.pretty.scenario'),
                            new Reference('output.node.printer.pretty.scenario_setup')
                        )),
                        new Definition('Behat\Behat\Output\Node\EventListener\AST\StepListener', array(
                            new Reference('output.node.printer.pretty.step'),
                            new Reference('output.node.printer.pretty.step_setup')
                        )),
                    )
                ),
                $this->proxySiblingEvents(
                    OutlineTested::BEFORE,
                    OutlineTested::AFTER,
                    array(
                        $this->proxyEventsIfParameterIsSet(
                            'expand',
                            false,
                            new Definition('Behat\Behat\Output\Node\EventListener\AST\OutlineTableListener', array(
                                new Reference('output.node.printer.pretty.outline_table'),
                                new Reference('output.node.printer.pretty.example_row'),
                                new Reference('output.node.printer.pretty.example_setup'),
                                new Reference('output.node.printer.pretty.example_step_setup')
                            ))
                        ),
                        $this->proxyEventsIfParameterIsSet(
                            'expand',
                            true,
                            new Definition('Behat\Behat\Output\Node\EventListener\AST\OutlineListener', array(
                                new Reference('output.node.printer.pretty.outline'),
                                new Reference('output.node.printer.pretty.example'),
                                new Reference('output.node.printer.pretty.example_step'),
                                new Reference('output.node.printer.pretty.example_setup'),
                                new Reference('output.node.printer.pretty.example_step_setup')
                            ))
                        )
                    )
                ),
            )
        ));
        $container->setDefinition(self::ROOT_LISTENER_ID, $definition);
    }