SessionImpl implements Session { public int getMaxInactiveInterval() { return session.getMaxInactiveInterval(); } SessionImpl(HttpServletRequest request, HttpSession session, SessionLock lock); Object getAttribute(String name); List<String> getAttributeNames(); void setAttribute(String name, Object value); List<String> getAttributeNames(String prefix); int getMaxInactiveInterval(); void invalidate(); boolean isInvalidated(); void setMaxInactiveInterval(int seconds); void restoreDirtyObjects();  }
@Test public void get_max_inactive() { HttpSession hs = mockHttpSession(); int seconds = 999; expect(hs.getMaxInactiveInterval()).andReturn(seconds); replay(); Session session = new SessionImpl(null, hs, null); assertEquals(session.getMaxInactiveInterval(), seconds); verify(); }