@Override
    public void process(HttpResponse response, HttpContext context) throws
            HttpException, IOException {
        List<Header> warnings = Arrays.stream(response.getHeaders("Warning")).filter(header -> !this.isDeprecationMessage(header.getValue())).collect(Collectors.toList());
        response.removeHeaders("Warning");
        warnings.stream().forEach(header -> response.addHeader(header));
    }
@Test
    public void testInterceptorNoHeader() throws IOException, HttpException {
        ElasticsearchFilterDeprecationWarningsInterceptor interceptor = new ElasticsearchFilterDeprecationWarningsInterceptor();

        HttpResponse response = new BasicHttpResponse(new BasicStatusLine(new ProtocolVersion("HTTP", 0, 0), 0, null));
        interceptor.process(response, null);

        assertThat(response.getAllHeaders())
                .as("Number of Headers should be 0 and the interceptor should not fail in itself.")
                .hasSize(0);
    }