private function checkContent(Revision $revision)
    {
        $content = $revision->getContent();

        if (null === $content || !($content instanceof AbstractClassContent)) {
            $this->_em->remove($revision);
            throw new ClassContentException('Orphan revision, deleted', ClassContentException::REVISION_ORPHAN);
        }

        if ($revision->getRevision() != $content->getRevision()) {
            throw new ClassContentException('Content is out of date', ClassContentException::REVISION_OUTOFDATE);
        }

        return $content;
    }