@Test public void decompressEmpty() throws IOException { Map<String, List<String>> headers = new HashMap<>(); headers.put("Content-Type", Collections.singletonList("application/json")); headers.put("Content-Encoding", Collections.singletonList("gzip")); HttpResponse res = new HttpResponse(200, headers); Assertions.assertEquals("", res.decompress().entityAsString()); Assertions.assertEquals(0, res.decompress().entity().length); } }