@Test
    void deflateResponsesWorkWithBasicResponseHandler() throws Exception {
        final String entityText = "Hello, this is some plain text coming back.";

        configureServer(bootstrap -> bootstrap
                .register("*", createDeflateEncodingRequestHandler(entityText, false)));

        final HttpHost target = startServer();

        final TestClient client = client();

        final HttpGet request = new HttpGet("/some-resource");
        final String response = client.execute(target, request, new BasicHttpClientResponseHandler());
        Assertions.assertEquals(entityText, response, "The entity text is correctly transported");
    }
Try with a bunch of client threads, to check that it's thread-safe.

@throws Exception
            if there was a problem
httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestContentCodings.java