/**
  * @param string $baseUrl
  * @param int $responseStatusCode
  * @param array $headers
  *
  * @return \Ivory\HttpAdapter\HttpAdapterInterface
  */
 private function mockHttpClient($baseUrl, $responseStatusCode, array $headers = array())
 {
     $mockHttpClient = new \Ivory\HttpAdapter\MockHttpAdapter();
     $mockHttpClient->getConfiguration()->setBaseUri($baseUrl);
     $messageFactory = new \Ivory\HttpAdapter\Message\MessageFactory($baseUrl);
     $mockHttpClient->appendResponse($messageFactory->createResponse($responseStatusCode, \Ivory\HttpAdapter\Message\RequestInterface::PROTOCOL_VERSION_1_1, $headers));
     return $mockHttpClient;
 }
 private function givenGoogleReturns($payload)
 {
     $messageFactory = new \Ivory\HttpAdapter\Message\MessageFactory();
     $response = $messageFactory->createResponse(200, \Ivory\HttpAdapter\Message\RequestInterface::PROTOCOL_VERSION_1_1, ['Content-Type: application/json'], $payload);
     $this->calling($this->mockAdapter)->get = $response;
 }