ResponseWriter implements Serializable { protected boolean acceptsGzippedResource(HttpServletRequest request) { return acceptsEncoding(request, "gzip"); } ResponseWriter(DeploymentConfiguration deploymentConfiguration); private  ResponseWriter(int bufferSize, boolean brotliEnabled); void writeResponseContents(String filenameWithPath, URL resourceUrl,
            HttpServletRequest request, HttpServletResponse response);  }
@Test public void acceptsGzippedResource() { Assert.assertTrue(acceptsGzippedResource("compress, gzip")); Assert.assertTrue(acceptsGzippedResource("brotli, gzip")); Assert.assertTrue(acceptsGzippedResource("gzip")); Assert.assertTrue(acceptsGzippedResource("gzip;")); Assert.assertTrue(acceptsGzippedResource("gzip;q")); Assert.assertFalse(acceptsGzippedResource("compress; q=1 , gzip;q=0")); Assert.assertFalse(acceptsGzippedResource("")); Assert.assertFalse(acceptsGzippedResource("compress")); Assert.assertTrue( acceptsGzippedResource("compress;q = 0.5, gzip;q=0.6")); Assert.assertTrue( acceptsGzippedResource("gzip;q=1.0, identity;q=0.5, *;q=0")); Assert.assertTrue(acceptsGzippedResource("*")); Assert.assertTrue(acceptsGzippedResource("*;q=0;gzip")); Assert.assertFalse(acceptsGzippedResource("*;q=0")); Assert.assertFalse(acceptsGzippedResource("*;q=0.0")); Assert.assertFalse(acceptsGzippedResource("*;q=0.00")); Assert.assertFalse(acceptsGzippedResource("*;q=0.000")); }