@Test
public void testIsBackendExpand(TestContext context) {

    expansionHandler = new ExpansionHandler(vertx, storage, httpClient, new HashMap<>(), ROOT, RULES_ROOT);
    context.assertFalse(expansionHandler.isBackendExpand("/some/request/uri"),
            "uri should not be a backend expand since no routing rules have been defined yet");
    List<Rule> rules = new ArrayList<>();
    Rule rule1 = new Rule();
    rule1.setUrlPattern("/test/rules/rule/backendExpand");
    rule1.setExpandOnBackend(true);
    rules.add(rule1);
    Rule rule2 = new Rule();
    rule2.setUrlPattern("/test/rules/rule/notBackendExpand");
    rule2.setExpandOnBackend(false);
    rules.add(rule2);
    expansionHandler.rulesChanged(rules);
    context.assertTrue(expansionHandler.isBackendExpand("/test/rules/rule/backendExpand"),
            "uri should be a backend expand");
    context.assertFalse(expansionHandler.isBackendExpand("/test/rules/rule/notBackendExpand"),
            "uri should not be a backend expand");
    context.assertFalse(expansionHandler.isBackendExpand("/some/other/request/uri"),
            "uri should not be a backend expand");
}