protected function findContentType($spaceId, $contentTypeName)
    {
        $contentTypes = $this->contentTypeRepo->findNewestByName($spaceId, $contentTypeName);
        if ($contentTypes->isEmpty()) {
            throw new InvalidArgumentException(
                sprintf(
                    'Content type "%s" in space "%s" not found!',
                    $contentTypeName,
                    $spaceId
                )
            );
        }
        if ($contentTypes->count() > 1) {
            throw new InvalidArgumentException(
                sprintf(
                    'Multiple content types with name "%s" found in space "%s"!',
                    $contentTypeName,
                    $spaceId
                )
            );
        }
        $contentType = $contentTypes->first();
        return $contentType;
    }