protected function createClient($mock, History $history)
{
$path = sprintf('%s/../../fixtures/%s', __DIR__, $mock);
$client = ClientFactory::factory();
$httpClient = $client->getHttpClient();
$mock = new Mock([$path]);
$httpClient->getEmitter()->attach($mock);
$httpClient->getEmitter()->attach($history);
return $client;
}