SitePermissionHandler extends AbstractSiteHandler { public TabbedModelAndView preProcessNextTab(TabbedController tc, Tab nextTabID, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors) { SiteEditorContext ctx = getEditorContext(req); List<Permission> permissions = new LinkedList<Permission>(); permissions.addAll(ctx.getSite().getPermissions()); TabbedModelAndView tmav = tc.new TabbedModelAndView(); tmav.addObject("permissions", permissions); return tmav; }  @Override void initBinder(HttpServletRequest request, ServletRequestDataBinder binder); void processTab(TabbedController tc, Tab currentTab,
			HttpServletRequest req, HttpServletResponse res, Object comm,
			BindException errors); TabbedModelAndView preProcessNextTab(TabbedController tc,
			Tab nextTabID, HttpServletRequest req, HttpServletResponse res,
			Object comm, BindException errors); ModelAndView processOther(TabbedController tc, Tab currentTab,
			HttpServletRequest req, HttpServletResponse res, Object comm,
			BindException errors); void setSiteManager(SiteManager siteManager); void setAccessStatusList(List<String> accessStatusList); void setBusinessObjectFactory(BusinessObjectFactory businessObjectFactory);  }
@Test public final void testPreProcessNextTab() { try { HttpServletRequest aReq = new MockHttpServletRequest(); SiteManager siteManager = new MockSiteManagerImpl(testFile); testInstance.setSiteManager(siteManager); Site site = siteManager.getSite(9000L, true); List<Annotation> list = createAnnotationList(); assertFalse(checkSortedList(list)); site.setAnnotations(list); SiteEditorContext ctx = new SiteEditorContext(site); aReq.getSession().setAttribute(SiteController.EDITOR_CONTEXT, ctx); HttpServletResponse aResp = new MockHttpServletResponse(); SitePermissionCommand aCmd = new SitePermissionCommand(); TabbedController tc = new SiteController(); TabConfig tabConfig = new TabConfig(); tabConfig.setViewName("site"); List<Tab> tabs = getTabList(siteManager); tabConfig.setTabs(tabs); tc.setTabConfig(tabConfig); Tab currentTab = tabs.get(1); BindException aErrors = new BindException(aCmd, aCmd.getActionCmd()); ModelAndView mav = testInstance.preProcessNextTab(tc, currentTab, aReq, aResp, aCmd, aErrors); assertNotNull(mav); assertFalse(checkSortedList(site.getAnnotations())); } catch(Exception e) { fail(e.getMessage()); } }