@Test
  public void testSessionNotGenerated() throws Exception {
    Callback c = (request, response) -> {
      String output = "OK";
      HttpSession s = request.getSession(false);
      if (s != null) {
        output = s.getId();
      }
      PrintWriter out = response.getWriter();
      out.write(output);
    };

    tester.setAttribute("callback_1", c);
    tester.start();

    request.setMethod("GET");
    request.setURI("/test/hello");
    request.setHeader("Host", "tester");
    request.setVersion("HTTP/1.0");

    response = HttpTester.parseResponse(tester.getResponses(request.generate()));

    assertEquals("Session should not have been created", "OK", response.getContent());
  }
Test that getSession(false) does not create a new session
extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java