@Test(expected=HttpException.class)
public void testUnknownContentEncoding() throws Exception {

    HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
    StringEntity original = new StringEntity("encoded stuff");
    original.setContentEncoding("whatever");
    response.setEntity(original);
    HttpContext context = new BasicHttpContext();
    HttpResponseInterceptor interceptor = new ResponseContentEncoding();
    interceptor.process(response, context);
}