function test_send_request_and_get_response_concurrently()
 {
     $client = new CurlHttpClient();
     $google_request = new HttpRequest('GET', 'http://www.google.com/');
     $yahoo_request = new HttpRequest('GET', 'http://www.yahoo.com/');
     $google_key = $client->send_request($google_request);
     $yahoo_key = $client->send_request($yahoo_request);
     $yahoo_response = $client->get_response_for($yahoo_key);
     $google_response = $client->get_response_for($google_key);
     $this->assertContains('Server: gws', $google_response);
     $this->assertContains('X-XRDS-Location: http://open.login.yahooapis.com/openid20/www.yahoo.com/xrds', $yahoo_response);
 }
 function test_send_request_with_head_method()
 {
     $client = new CurlHttpClient();
     $google_request = new HttpRequest('HEAD', 'http://www.google.com/');
     $google_key = $client->send_request($google_request);
     $google_response = $client->get_response_for($google_key);
     $this->assertEquals('gws', $google_response->headers['server']);
 }