@Test
public void testIncreaseRequestHops(TestContext context){

    IncreaseHopsRequest request = new IncreaseHopsRequest(new CaseInsensitiveHeaders());
    context.assertFalse(HttpRequestHeader.containsHeader(request.headers(), HttpRequestHeader.X_HOPS),
            "x-hops header should not be present yet");
    HttpServerRequestUtil.increaseRequestHops(request);
    context.assertTrue(HttpRequestHeader.containsHeader(request.headers(), HttpRequestHeader.X_HOPS),
            "x-hops header should be present");
    context.assertEquals(1, HttpRequestHeader.getInteger(request.headers(), HttpRequestHeader.X_HOPS));
    HttpServerRequestUtil.increaseRequestHops(request);
    context.assertEquals(2, HttpRequestHeader.getInteger(request.headers(), HttpRequestHeader.X_HOPS));
    for (int i = 0; i < 500; i++) {
        HttpServerRequestUtil.increaseRequestHops(request);
    }
    context.assertEquals(502, HttpRequestHeader.getInteger(request.headers(), HttpRequestHeader.X_HOPS));
}