    @Test
    public void testInterceptorWithHeader() throws URISyntaxException, IOException, RequestSigningException {

        HttpRequestFactory requestFactory = createSigningRequestFactory();

        URI uri = URI.create("https://endpoint.net/billing-usage/v1/reportSources");
        HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(uri));
        request.getHeaders().put("Host", "ignored-hostname.com");
        // Mimic what the library does to process the interceptor.
        request.getInterceptor().intercept(request);

        assertThat(request.getHeaders().containsKey("Host"), is(false));
        assertThat(request.getHeaders().containsKey("host"), is(true));
        assertThat((String) request.getHeaders().get("host"), equalTo("endpoint.net"));
        assertThat(request.getUrl().getHost(), equalTo("endpoint.net"));
        assertThat(request.getHeaders().getAuthorization(), not(isEmptyOrNullString()));
    }