def TestHuntHelperWithMultipleMocks(client_mocks, check_flow_errors=False,
                                    token=None, iteration_limit=None):

  total_flows = set()

  # Worker always runs with absolute privileges, therefore making the token
  # SetUID().
  token = token.SetUID()

  client_mocks = [MockClient(client_id, client_mock, token=token)
                  for client_id, client_mock in client_mocks.iteritems()]
  worker_mock = MockWorker(check_flow_errors=check_flow_errors,
                           token=token)

  # Run the clients and worker until nothing changes any more.
  while iteration_limit is None or iteration_limit > 0:
    client_processed = 0

    for client_mock in client_mocks:
      client_processed += client_mock.Next()

    flows_run = []

    for flow_run in worker_mock.Next():
      total_flows.add(flow_run)
      flows_run.append(flow_run)

    if client_processed == 0 and not flows_run:
      break

    if iteration_limit:
      iteration_limit -= 1

  if check_flow_errors:
    CheckFlowErrors(total_flows, token=token)
Client requesting voice for a room.
dataset/ETHPy150Open google/grr/grr/lib/test_lib.py/TestHuntHelperWithMultipleMocks--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_muc.py/MUCClientProtocolTest.test_voice