@Test
public void testAcceptEncoding() throws Exception {

    HttpRequest request = new BasicHttpRequest("GET", "/");
    HttpContext context = new BasicHttpContext();

    HttpRequestInterceptor interceptor = new RequestAcceptEncoding();
    interceptor.process(request, context);
    Header header = request.getFirstHeader("Accept-Encoding");
    Assert.assertNotNull(header);
    Assert.assertEquals("gzip,deflate", header.getValue());
}