@Test
public void testDefaultHeaders() throws Exception {

    HttpRequest request = new BasicHttpRequest("GET", "/");
    request.addHeader("custom", "stuff");
    List<Header> defheaders = new ArrayList<Header>();
    defheaders.add(new BasicHeader("custom", "more stuff"));
    request.getParams().setParameter(AllClientPNames.DEFAULT_HEADERS, defheaders);
    HttpContext context = new BasicHttpContext();
    HttpRequestInterceptor interceptor = new RequestDefaultHeaders();
    interceptor.process(request, context);
    Header[] headers = request.getHeaders("custom");
    Assert.assertNotNull(headers);
    Assert.assertEquals(2, headers.length);
    Assert.assertEquals("stuff", headers[0].getValue());
    Assert.assertEquals("more stuff", headers[1].getValue());
}