def METHOD_NAME(self, _, manifest, expected_error):
    # Arrange
    media_types_registry = RWPMMediaTypesRegistry()
    link_relations_registry = RWPMLinkRelationsRegistry()
    collection_roles_registry = RWPMCollectionRolesRegistry()
    semantic_analyzer = RWPMSemanticAnalyzer(
        media_types_registry, link_relations_registry, collection_roles_registry
    )
    # Act
    with pytest.raises(expected_error.__class__) as assert_raises_context:
        semantic_analyzer.visit(manifest)
    # Assert
    assert str(assert_raises_context.value) == str(expected_error)