@Test
  public void testCommitSessionValveInvalidSession() throws Exception {
    final Callback c = (request, response) -> {
      final HttpSession session = request.getSession();
      session.invalidate();
      response.getWriter().write("done");
    };

    final WebResponse response = setCallbackAndExecuteGet(c);
    assertEquals("done", response.getText());
  }
Test setting the session expiration via a property change as would happen under normal
deployment conditions.
extensions/geode-modules-test/src/main/java/org/apache/geode/modules/session/AbstractSessionsTest.java