SessionManagerImpl implements SessionManager { @Override public Map<String, Object> getContext(String key) { ContextEntry entry = getOrCreateContextEntry(key); return entry.getContext(); }  void setSessionReapearFrequency(int sessionReaperFrequency); void setSessionTimeout(int sessionTimeout); @PostConstruct void start(); @PreDestroy void stop(); @Override Map<String, Object> getContext(String key);  }
@Test public void testSessionManager() { Map<String, Object> session = _sessionManager.getContext("A"); session.put("hello", "world"); sleep(5 * 1000); session = _sessionManager.getContext("A"); assertEquals("world", session.get("hello")); sleep(15 * 1000); session = _sessionManager.getContext("A"); assertFalse(session.containsKey("hello")); }