@NotNull
  @Override
  public Response intercept(@NotNull Chain chain) throws IOException {
    Request request = chain.request().newBuilder().removeHeader("Accept-Encoding").build();

    Response response = chain.proceed(request);

    if (response.headers("Content-Encoding").contains("gzip")) {
      response.close();
    }
    return response;
  }
@Test
  public void intercept_whenGzipContentEncodingNotIncluded_shouldNotCloseTheResponse() throws IOException {
    when(response.headers()).thenReturn(Headers.of("Custom-header", "not-gzip"));

    underTest.intercept(chain);

    verify(response, times(0)).close();
  }