def testMarshalAndUnmarshal(self):
    requestBatch = [
        ModelCommand(commandID="abc", method="defineModel",
          args={'key1': 4098, 'key2': 4139}),
        ModelInputRow(rowID="foo", data=[1, 2, "Sep 21 02:24:21 UTC 2013"]),
        ModelInputRow(rowID="bar", data=[9, 54, "Sep 21 02:24:38 UTC 2013"]),
      ]
    batchState = BatchPackager.marshal(batch=requestBatch)
    msg = RequestMessagePackager.marshal(batchID="foobar",
                                         batchState=batchState)

    r = RequestMessagePackager.unmarshal(msg)

    self.assertEqual(r.batchID, "foobar")
    self.assertEqual(r.batchState, batchState)

    # Make sure we aren't forgetting to test any returned fields
    self.assertEqual(set(["batchID", "batchState"]), set(r._fields))