public function setWorkflowStageOnDocument(HydrateEvent $event)
    {
        $document = $event->getDocument();

        if (!$this->supports($event)) {
            return;
        }

        $node = $event->getNode();
        $locale = $event->getLocale();

        $document->setWorkflowStage(
            $node->getPropertyValueWithDefault(
                $this->propertyEncoder->localizedSystemName(self::WORKFLOW_STAGE_FIELD, $locale),
                WorkflowStage::TEST
            )
        );

        $event->getAccessor()->set(
            self::PUBLISHED_FIELD,
            $node->getPropertyValueWithDefault(
                $this->propertyEncoder->localizedSystemName(self::PUBLISHED_FIELD, $locale),
                null
            )
        );
    }