SessionHelpers { public MethodHandle[] initSessionManagement(ServletContext servletContext) { return initSessionManagement(servletContext, false); }  ServletRequest prepareRequest(ServletRequest request, ServletResponse response,
      ServletContext originalServletContext); ServletResponse prepareResponse(ServletRequest request, ServletResponse response); MethodHandle[] initSessionManagement(ServletContext servletContext); MethodHandle[] initSessionManagement(ServletContext servletContext, boolean reset); void commitRequest(ServletRequest request, ServletRequest oldRequest); @SuppressWarnings("unchecked") void interceptHttpListener(EventListener caller, HttpSessionEvent event); void onAddListener(ServletContext servletContext, Object listener);  }
@Test public void testInitSessionManagement() { when(servletContext.getClassLoader()).thenReturn(this.getClass().getClassLoader()); SessionHelpersFacade.initSessionManagement(servletContext); ArgumentCaptor<SessionManager> sessionManager = ArgumentCaptor.forClass(SessionManager.class); verify(servletContext).setAttribute(eq(Attributes.SESSION_MANAGER), sessionManager.capture()); assertNotNull(sessionManager.getValue()); sessionManager.getValue().close(); }