def METHOD_NAME(jp_serverapp, has_app):
    name = "tests.extension.notanextension"
    manager = ExtensionManager(serverapp=jp_serverapp if has_app else None)
    manager.add_extension(name, enabled=True)  # should only warn
    jp_serverapp.reraise_server_extension_failures = True
    if has_app:
        with pytest.raises(ExtensionModuleNotFound):
            assert manager.add_extension(name, enabled=True) is False
    else:
        assert manager.add_extension(name, enabled=True) is False