@Test
  public void testGetLastAccessedTime2() throws Exception {
    // Setup
    CallbackServlet s = (CallbackServlet) getServlet();
    s.setCallback((request, response) -> request.getSession());

    doFilter();

    HttpServletRequest request = (HttpServletRequest) getFilteredRequest();
    long lastAccess = request.getSession().getLastAccessedTime();
    assertTrue("Session should have a non-zero last access time", lastAccess > 0);

    MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse();
    Cookie cookie = (Cookie) response.getCookies().get(0);

    MockHttpServletRequest mRequest = getWebMockObjectFactory().createMockRequest();
    mRequest.setRequestURL("/test/foo/bar");
    mRequest.setContextPath(CONTEXT_PATH);
    mRequest.addCookie(cookie);
    getWebMockObjectFactory().addRequestWrapper(mRequest);

    Thread.sleep(50);
    doFilter();

    assertTrue("Last access time should be changing",
        request.getSession().getLastAccessedTime() > lastAccess);
  }
Test that repeated accesses update the last accessed time
extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/CommonTests.java