def METHOD_NAME(self, routingKey, shouldMatch, filter):
    cb = mock.Mock()
    yield self.mq.startConsuming(cb, filter)
    self.mq.produce(routingKey, 'x')
    self.assertEqual(shouldMatch, cb.call_count == 1)
    if shouldMatch:
        cb.assert_called_once_with(routingKey, 'x')