*
* @throws IOException
* @throws HttpException
*/
public void testCookiesOneGiven() throws HttpException, IOException {
ClientResponse response =
client.resource(getBaseURI() + "/context/httpheaders/cookies")
.cookie(new Cookie("foo", "bar")).post(null);
assertEquals(200, response.getStatusCode());
String responseBody = response.getEntity(String.class);
assertEquals("cookies:foo=bar:", responseBody);
response =
client.resource(getBaseURI() + "/context/httpheaders/cookies").cookie("foo=bar")
.post(null);
assertEquals(200, response.getStatusCode());
responseBody = response.getEntity(String.class);
assertEquals("cookies:foo=bar:", responseBody);
}