@Test
    void testDecompressionWithBrotli() throws Exception {

        final byte[] bytes = new byte[] {33, 44, 0, 4, 116, 101, 115, 116, 32, 98, 114, 111, 116, 108, 105, 10, 3};

        final HttpEntity entity = new BrotliDecompressingEntity(new ByteArrayEntity(bytes, null));
        Assertions.assertEquals("test brotli\n", EntityUtils.toString(entity));
    }
Brotli decompression test implemented by request with specified response encoding br

@throws Exception
httpclient5/src/test/java/org/apache/hc/client5/http/entity/TestBrotli.java