@Test
public void testIsZipRequest(TestContext context) {

    expansionHandler = new ExpansionHandler(vertx, storage, httpClient, new HashMap<>(), ROOT, RULES_ROOT);
    CaseInsensitiveHeaders params = new CaseInsensitiveHeaders();
    params.set(ZIP_PARAM, "true");
    context.assertFalse(expansionHandler.isZipRequest(new Request(HttpMethod.PUT, "/some/uri", params)),
            "PUT requests should not be zip requests");
    context.assertTrue(expansionHandler.isZipRequest(new Request(HttpMethod.GET, "/some/uri", params)),
            "GET request with correct params and not configured as expandOnBackend should be zip requests");
    params.set(ZIP_PARAM, "false");
    context.assertFalse(expansionHandler.isZipRequest(new Request(HttpMethod.GET, "/some/uri", params)),
            "GET request with correct params (value=false) and not configured as expandOnBackend should not be zip requests");
    params.set(ZIP_PARAM, "foobar");
    context.assertTrue(expansionHandler.isZipRequest(new Request(HttpMethod.GET, "/some/uri", params)),
            "GET request with correct params (value != false) and not configured as expandOnBackend should be zip requests");
    context.assertFalse(expansionHandler.isZipRequest(new Request(HttpMethod.GET, "/some/uri", new CaseInsensitiveHeaders())),
            "GET requests without correct params should not be zip requests");
    List<Rule> rules = new ArrayList<>();
    Rule rule1 = new Rule();
    rule1.setUrlPattern("/some/backendExpand/uri");
    rule1.setExpandOnBackend(true);
    rules.add(rule1);
    expansionHandler.rulesChanged(rules);
    params.set(ZIP_PARAM, "true");
    context.assertFalse(expansionHandler.isZipRequest(new Request(HttpMethod.GET, "/some/backendExpand/uri", params)),
            "GET request with correct params and configured as expandOnBackend should not be zip requests");
}