'Test the AFF4 Flow object.'

def testAFF4FlowObject(self):

    client = aff4.FACTORY.Create(self.client_id, aff4_grr.VFSGRRClient, token=self.token)
    client.Close()
    session_ids = []
    for _ in range(10):
        session_ids.append(flow.GRRFlow.StartFlow(client_id=self.client_id, flow_name=flow_test_lib.FlowOrderTest.__name__, token=self.token))
    flow_obj = aff4.FACTORY.Open(session_ids[0], mode='r', token=self.token)
    self.assertEqual(flow_obj.runner_args.flow_name, flow_test_lib.FlowOrderTest.__name__)
    self.assertEqual(flow_obj.session_id, session_ids[0])
    self.assertEqual(flow_obj.__class__.__name__, flow_test_lib.FlowOrderTest.__name__)
