@Test
  public void testMultipleAttributeUpdates() throws Exception {
    final String key = "value_testMultipleAttributeUpdates";
    Callback c = (request, response) -> {
      HttpSession session = request.getSession();
      for (int i = 0; i < 1000; i++) {
        session.setAttribute(key, Integer.toString(i));
      }
    };
    servlet.getServletContext().setAttribute("callback", c);

    WebConversation wc = new WebConversation();
    WebRequest req = new GetMethodWebRequest(String.format("http://localhost:%d/test", port));

    // Execute the callback
    req.setParameter("cmd", QueryCommand.CALLBACK.name());
    req.setParameter("param", "callback");
    WebResponse response = wc.getResponse(req);

    String sessionId = response.getNewCookieValue("JSESSIONID");
    assertThat(region.get(sessionId).getAttribute(key)).isEqualTo("999");
  }
Test that multiple attribute updates, within the same request result in only the latest one
being effective.
extensions/geode-modules-tomcat8/src/distributedTest/java/org/apache/geode/modules/session/TestSessionsTomcat8Base.java