/** Test of getMainSessionController method, of class SilverpeasWebUtil. */ @Test public void testGetMainSessionController() { HttpServletRequest request = mock(HttpServletRequest.class); HttpSession session = mock(HttpSession.class); MainSessionController controller = mock(MainSessionController.class); when(session.getAttribute(MainSessionController.MAIN_SESSION_CONTROLLER_ATT)) .thenReturn(controller); when(request.getSession()).thenReturn(session); SilverpeasWebUtil util = new SilverpeasWebUtil(); MainSessionController result = util.getMainSessionController(request); assertEquals(controller, result); }