@Test
  public void shouldCacheSessionOnClient()
      throws Exception {
    manager.startAllInactiveContainers();
    await().until(() -> {
      ServerContainer container = manager.getContainer(0);
      return container.getState().isStarted();
    });
    String key = "value_testSessionExpiration";
    String value = "Foo";

    client.setPort(Integer.parseInt(manager.getContainerPort(0)));
    Client.Response resp = client.set(key, value);
    assertThat(resp.getResponse()).isEqualTo("");
    assertThat(resp.getSessionCookie()).isNotEqualTo("");

    serverVM.invoke("set bogus session key", () -> {
      final InternalCache cache = ClusterStartupRule.memberStarter.getCache();
      Region<String, HttpSession> region = cache.getRegion("gemfire_modules_sessions");
      region.values().forEach(session -> session.setAttribute(key, "bogus"));
    });

    // Make sure the client still sees its original cached value
    resp = client.get(key);
    assertThat(resp.getResponse()).isEqualTo(value);
  }
Test that we cache the user's session on the client, rather than going to the server for each
request
geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Jetty9CachingClientServerTest.java