public function loadVersionInfoById($contentId, $versionNo = null)
    {
        // @todo SPI should also support null to avoid concurrency issues
        if ($versionNo === null) {
            $versionNo = $this->loadContentInfo($contentId)->currentVersionNo;
        }

        try {
            $spiVersionInfo = $this->persistenceHandler->contentHandler()->loadVersionInfo(
                $contentId,
                $versionNo
            );
        } catch (APINotFoundException $e) {
            throw new NotFoundException(
                'VersionInfo',
                array(
                    'contentId' => $contentId,
                    'versionNo' => $versionNo,
                ),
                $e
            );
        }

        $versionInfo = $this->domainMapper->buildVersionInfoDomainObject($spiVersionInfo);

        if ($versionInfo->isPublished()) {
            $function = 'read';
        } else {
            $function = 'versionread';
        }

        if (!$this->repository->canUser('content', $function, $versionInfo)) {
            throw new UnauthorizedException('content', $function, array('contentId' => $contentId));
        }

        return $versionInfo;
    }