def METHOD_NAME(self):
    session = protocol.BaseSession()
    @wamp.error("com.myapp.error1")
    class AppError1(Exception):
        pass
    @wamp.error("com.myapp.error2")
    class AppError2(Exception):
        pass
    session.define(AppError1)
    session.define(AppError2)
    exc = AppError1()
    msg = session._message_from_exception(message.Call.MESSAGE_TYPE, 123456, exc)
    self.assertEqual(msg.marshal(), [message.Error.MESSAGE_TYPE, message.Call.MESSAGE_TYPE, 123456, {}, "com.myapp.error1"])