def test_incremental(self):
        m = b'{ "id": "1", "method": "foo", "params": [] }'
        proto = self.protocol
        for i in range(len(m)-1):
            proto.data_received(m[i:i+1])
            self.assertEqual(self.get_messages(), [])
        proto.data_received(m[-1:])
        mm = self.get_messages()
        self.assertEqual(len(mm), 1)
        self.assertEqual(mm[0], {'id': '1', 'method': 'foo', "params": []})