public function validateDocumentAnnotation($annotation)
    {
        if (!in_array($annotation, $this->getDocumentAnnotations())) {
            throw $this->getException(
                'The document annotation isn\'t valid ("%s" given, expecting one of following: %s)',
                [$annotation, implode(', ', $this->getDocumentAnnotations())]
            );
        }

        return $annotation;
    }