@Test
  public void canSupportDeflateOnError() throws Exception {
    /* enqueue a zipped response */
    final String responseData = "Compressed Data";
    server.enqueue(
        new MockResponse()
            .setResponseCode(400)
            .addHeader("Content-Encoding", "deflate")
            .setBody(new Buffer().write(deflate(responseData))));

    TestInterface api =
        newBuilder().target(TestInterface.class, "http://localhost:" + server.getPort());

    try {
      api.get();
      fail("Expect FeignException");
    } catch (FeignException e) {
      /* verify that the response is unzipped */
      assertThat(e.responseBody())
          .isNotEmpty()
          .map(body -> new String(body.array(), StandardCharsets.UTF_8))
          .get()
          .isEqualTo(responseData);
    }
  }
Some client implementation tests should override this test if the PATCH operation is
unsupported.
core/src/test/java/feign/client/AbstractClientTest.java