private function printExampleHeaderOnBeforeExampleEvent(Formatter $formatter, Event $event)
    {
        if (!$event instanceof AfterScenarioSetup) {
            return;
        }

        $this->example = $event->getScenario();

        $this->exampleSetupPrinter->printSetup($formatter, $event->getSetup());
        $this->examplePrinter->printHeader($formatter, $event->getFeature(), $this->example);
    }