@Test
public void testBadRequestResponseForExceedingMaxExpansionLevelHard(TestContext context) {

    Map<String, Object> properties = new HashMap<>();
    properties.put("max.expansion.level.hard", "10");
    expansionHandler = new ExpansionHandler(vertx, storage, httpClient, properties, ROOT, RULES_ROOT);
    CaseInsensitiveHeaders params = new CaseInsensitiveHeaders();
    params.set(EXPAND_PARAM, "15");
    HttpServerResponse response = Mockito.mock(HttpServerResponse.class);
    Request request = new Request(HttpMethod.GET, "/some/expandRequest/uri", params, response);
    expansionHandler.handleExpansionRecursion(request);
    verify(response, times(1)).setStatusCode(StatusCode.BAD_REQUEST.getStatusCode());
    verify(response, times(1)).setStatusMessage(StatusCode.BAD_REQUEST.getStatusMessage());
    verify(response, times(1)).end("Expand level '15' is greater than the maximum expand level '10'");
    verifyZeroInteractions(httpClient);
}