@Test
  public void testSessionIdEmbeddedInUrl() throws Exception {
    Callback c = (request, response) -> {
      GemfireHttpSession session = (GemfireHttpSession) request.getSession();
      PrintWriter out = response.getWriter();
      out.write(session.getId());
    };

    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()));
    List<Cookie> cookies = getCookies(response);
    String sessionId = response.getContent();
    assertEquals("Session ids should be the same", sessionId, getSessionCookie(cookies).getValue());

    request.setURI("/test/hello;jsessionid=" + sessionId);
    response = HttpTester.parseResponse(tester.getResponses(request.generate()));
    cookies = getCookies(response);

    assertEquals("Session ids should be the same", sessionId, getSessionCookie(cookies).getValue());
  }
Test session id embedded in the URL
extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java