int requestInterval = 500;
for (int i = 0; i < maxInactivePeriod * (1000 / requestInterval); ++i)
{
Request request = client.newRequest("http://localhost:" + port2 + contextPath + servletMapping);
request.header("Cookie", sessionCookie);
ContentResponse response2 = request.send();
assertEquals(HttpServletResponse.SC_OK , response2.getStatus());
assertEquals("test", response2.getContentAsString());
String setCookie = response2.getHeaders().get("Set-Cookie");
if (setCookie!=null)