Assert this matches a :ref:`message spec <message spec>`.

        Returns self.

def assert_matches(self, *args, **kwargs):
        """Assert this matches a :ref:`message spec <message spec>`.

        Returns self.
        """
        matcher = make_matcher(*args, **kwargs)
        if not matcher.matches(self):
            raise AssertionError('%r does not match %r' % (self, matcher))
        return self