### Question:
RadiologyDashboardModalitiesTabController { @RequestMapping(method = RequestMethod.GET) protected ModelAndView getRadiologyModalitiesTab(HttpServletRequest request) { final ModelAndView modelAndView = new ModelAndView(RADIOLOGY_MODALITIES_TAB_VIEW); request.getSession() .setAttribute(RadiologyWebConstants.RADIOLOGY_DASHBOARD_TAB_SESSION_ATTRIBUTE, RADIOLOGY_MODALITES_TAB_REQUEST_MAPPING); return modelAndView; }   static final String RADIOLOGY_MODALITES_TAB_REQUEST_MAPPING; }### Answer:
@Test public void shouldReturnModelAndViewOfTheRadiologyModalitiesTabPageAndSetTabSessionAttributeToRadiologyModalitiesTabPage() throws Exception { MockHttpServletRequest mockRequest = new MockHttpServletRequest(); MockHttpSession mockSession = new MockHttpSession(); mockRequest.setSession(mockSession); ModelAndView modelAndView = radiologyDashboardModalitiesTabController.getRadiologyModalitiesTab(mockRequest); assertNotNull(modelAndView); assertThat(modelAndView.getViewName(), is(RadiologyDashboardModalitiesTabController.RADIOLOGY_MODALITIES_TAB_VIEW)); assertThat(mockSession.getAttribute(RadiologyWebConstants.RADIOLOGY_DASHBOARD_TAB_SESSION_ATTRIBUTE), is(RadiologyDashboardModalitiesTabController.RADIOLOGY_MODALITES_TAB_REQUEST_MAPPING)); }