def METHOD_NAME(self):
    sessionId = "some_id"
    for obj in (1, {"a": 2}, "b", {"sessionId": sessionId}):
        stream = utils.JSONStream(obj)
        self.assertEqual(
            obj, json.loads(stream.read(100).decode("latin1"))
        )
        self.assertEqual(0, len(stream.read(100).decode("latin1")))