/**
  * @param  Request  $request
  * @return Response
  */
 public function request(Request $request)
 {
     $guzzleRequest = $this->prepareRequest($request);
     /** @var GuzzleResponse $guzzleResponse */
     $guzzleResponse = $this->client->send($guzzleRequest);
     return new Response($guzzleResponse->getProtocolVersion(), (int) $guzzleResponse->getStatusCode(), $guzzleResponse->getReasonPhrase(), HeaderConverter::convertComplexAssociativeToFlatAssociative($guzzleResponse->getHeaders()), (string) $guzzleResponse->getBody());
 }
 /**
  * @param array $complexAssociativeHeaders
  * @param array $expected
  * @dataProvider convertComplexAssociativeToFlatAssociativeProvider
  */
 public function testConvertComplexAssociativeToFlatAssociative(array $complexAssociativeHeaders, array $expected)
 {
     $actual = HeaderConverter::convertComplexAssociativeToFlatAssociative($complexAssociativeHeaders);
     $this->assertEquals($expected, $actual);
 }