public function testAddsCookiesFromResponseWithRequest()
 {
     $response = new Response(200, array('Set-Cookie' => "fpc=d=.Hm.yh4.1XmJWjJfs4orLQzKzPImxklQoxXSHOZATHUSEFciRueW_7704iYUtsXNEXq0M92Px2glMdWypmJ7HIQl6XIUvrZimWjQ3vIdeuRbI.FNQMAfcxu_XN1zSx7l.AcPdKL6guHc2V7hIQFhnjRW0rxm2oHY1P4bGQxFNz7f.tHm12ZD3DbdMDiDy7TBXsuP4DM-&v=2; expires=Fri, 02-Mar-2019 02:17:40 GMT;"));
     $request = new Request('GET', 'http://www.example.com');
     $this->jar->extractCookies($request, $response);
     $this->assertEquals(1, count($this->jar));
 }
 /**
  * Update the cookie jar with the cookie received from the server
  *
  * @param RequestInterface $request Request object
  * @param ResponseInterface $response Response object
  * @return ResponseInterface Response object
  */
 public function onReceive(RequestInterface $request, ResponseInterface $response)
 {
     $this->coockieJar->extractCookies($request, $response);
     return $response;
 }