def METHOD_NAME(self):
    self.doValidationTest(validation.MessageValidator(
        events=[b'started', b'stopped'],
        messageValidator=validation.DictValidator(
            a=validation.BooleanValidator(),
            xid=validation.IntValidator(),
            yid=validation.IntValidator())),
        good=[
            (('thing', '1', '2', 'started'),
             {'xid': 1, 'yid': 2, 'a': True}),
    ], bad=[
            # routingKey is not a tuple
            ('thing', {}),
            # routingKey has wrong event
            (('thing', '1', '2', 'exploded'),
             {'xid': 1, 'yid': 2, 'a': True}),
            # routingKey element has wrong type
            (('thing', 1, 2, 'started'),
             {'xid': 1, 'yid': 2, 'a': True}),
            # routingKey element isn't in message
            (('thing', '1', '2', 'started'),
             {'xid': 1, 'a': True}),
            # message doesn't validate
            (('thing', '1', '2', 'started'),
             {'xid': 1, 'yid': 2, 'a': 'x'}),
    ])