def test_register_plugin(self, dispatcher):
        name = "some_name"

        class AClass:
            @event.event(name)
            def handler(self):
                pass

            @event.event(name)
            async def hander(self):
                pass

        obj = AClass()
        h_insts = dispatcher.register_plugin(obj)
        assert len(dispatcher.event_map) == 1
        assert len(h_insts) == 2
        for h_inst in h_insts:
            assert h_inst in dispatcher.event_map[name]