def METHOD_NAME(self):
    """Test callbacks in menus."""
    self.room1.key = "room1"
    def on_enter(caller, menu):
        caller.msg("on_enter:{}".format(menu.title))
    def on_nomatch(caller, string, choice):
        caller.msg("on_nomatch:{},{}".format(string, choice.key))
    def on_leave(caller, obj):
        caller.msg("on_leave:{}".format(obj.key))
    self.menu.add_choice(
        "test", key="e", on_enter=on_enter, on_nomatch=on_nomatch, on_leave=on_leave
    )
    self.call(CmdNoMatch(building_menu=self.menu), "e", "on_enter:test")
    self.call(CmdNoMatch(building_menu=self.menu), "ok", "on_nomatch:ok,e")
    self.call(CmdNoMatch(building_menu=self.menu), "@", "on_leave:room1")
    self.call(CmdNoMatch(building_menu=self.menu), "q")