public void testGzip() throws Exception
{
HttpClient client = new HttpClient();
{
GetMethod get = new GetMethod("http://localhost:8080/resteasy/gzip");
get.addRequestHeader("Accept-Encoding", "gzip, deflate");
int status = client.executeMethod(get);
Assert.assertEquals(200, status);
Assert.assertEquals("gzip", get.getResponseHeader("Content-Encoding").getValue());
GZIPInputStream gzip = new GZIPInputStream(get.getResponseBodyAsStream());
String response = readString(gzip);