def test_multiple(self):
        m = b'{ "id": "1", "method": "foo", "params": [] }' \
            b'{ "id": "2", "method": "bar", "params": [] }'
        proto = self.protocol
        proto.data_received(m)
        mm = self.get_messages()
        self.assertEqual(len(mm), 2)
        self.assertEqual(mm[0], {'id': '1', 'method': 'foo', 'params': []})
        self.assertEqual(mm[1], {'id': '2', 'method': 'bar', 'params': []})
        pp = self.protocols
        self.assertEqual(len(pp), 2)
        self.assertIs(pp[0], proto)
        self.assertIs(pp[1], proto)