def METHOD_NAME(event_manager, element_factory):
    @event_handler(CheckModel)
    def on_check_model(event):
        assert event.element.model
        assert event.element in element_factory
    @event_handler(TriggerUnlink)
    def on_trigger_unlink(event):
        event_manager.handle(CheckModel(event.element))
        event.element.unlink()
    event_manager.subscribe(on_check_model)
    event_manager.subscribe(on_trigger_unlink)
    operation = element_factory.create(Operation)
    event_manager.handle(TriggerUnlink(operation))
    assert operation._model is None
    assert operation not in element_factory