@Test
  public void testRemoveAttribute() throws Exception {
    final String key = "value_testRemoveAttribute";
    final String value = "Foo";

    final WebConversation wc = new WebConversation();
    final WebRequest req = prepareRequest(key, value);
    WebResponse response = wc.getResponse(req);
    final String sessionId = response.getNewCookieValue("JSESSIONID");

    // Implicitly remove the attribute
    req.removeParameter("value");
    wc.getResponse(req);

    // The attribute should not be accessible now...
    req.setParameter("cmd", QueryCommand.GET.name());
    req.setParameter("param", key);
    response = wc.getResponse(req);

    assertEquals("", response.getText());
    assertNull(region.get(sessionId).getAttribute(key));
  }
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