'Checks that the foreman uses the callback specified in the action.'

def testCallback(self, client_limit=None):

    client_rule_set = rdf_foreman.ForemanClientRuleSet(rules=[rdf_foreman.ForemanClientRule(rule_type=rdf_foreman.ForemanClientRule.Type.REGEX, regex=rdf_foreman.ForemanRegexClientRule(attribute_name='GRR    client', attribute_regex='GRR'))])
    with implementation.GRRHunt.StartHunt(hunt_name=standard.SampleHunt.__name__, client_rule_set=client_rule_set, client_limit=client_limit, client_rate=0, token=self.token) as hunt:
        hunt.GetRunner().Start()
    client = aff4.FACTORY.Open(self.client_id, mode='rw', token=self.token)
    info = client.Schema.CLIENT_INFO()
    info.client_name = 'GRR    Monitor'
    client.Set(client.Schema.CLIENT_INFO, info)
    client.Close()
    foreman = aff4.FACTORY.Open('aff4:/foreman', mode='rw', token=self.token)
    with utils.Stubber(standard.SampleHunt, 'StartClients', self.Callback):
        self.called = []
        foreman.AssignTasksToClient(client.urn)
        self.assertEqual(len(self.called), 1)
        self.assertEqual(self.called[0][1], [client.urn])
