SessionStorage { public synchronized void releaseSession(final String sessionId) { sessions.remove(sessionId); } SessionStorage(final SessionIdentifierFactory<T> identifierFactory); synchronized T getSessionIdentifier(final String sessionId); synchronized void releaseSession(final String sessionId);  }
@Test public void testReleaseSession() { final String id1 = storage.getSessionIdentifier(sessionId); Assert.assertNotNull(id1); storage.releaseSession(sessionId); final String id2 = storage.getSessionIdentifier(sessionId); Assert.assertNotSame(id1, id2); }