private function getOrCreateRoot($namespace, $title, $locale, $userId, $parent = null)
    {
        if (null !== ($collection = $this->collectionManager->getByKey($namespace, $locale))) {
            $collection->setTitle($title);

            return $collection;
        }

        return $this->createCollection($title, $namespace, $locale, $userId, $parent);
    }