@Test public final void testProcessCancel() { try { MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); TargetInstanceCommand comm = new TargetInstanceCommand(); comm.setCmd(TargetInstanceCommand.ACTION_EDIT); comm.setTargetInstanceId(5000L); Tab currTab = testInstance.getTabConfig().getTabs().get(0); assertTrue(currTab != null); BindException aError = new BindException(new DefaultSiteCommand(), null); ModelAndView mav = testInstance.processCancel(currTab, request, response, comm, aError); assertTrue(mav != null); assertTrue(mav.getViewName().equals("redirect:/curator/target/queue.html")); } catch (Exception e) { String message = e.getClass().toString() + " - " + e.getMessage(); log.debug(message); fail(message); } }
@Override protected ModelAndView processCancel(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors) { unbindContext(req); return new ModelAndView("redirect:/curator/target/queue.html"); }
TabbedTargetInstanceController extends TabbedController { @Override protected ModelAndView processCancel(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors) { unbindContext(req); return new ModelAndView("redirect:/curator/target/queue.html"); } }
TabbedTargetInstanceController extends TabbedController { @Override protected ModelAndView processCancel(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors) { unbindContext(req); return new ModelAndView("redirect:/curator/target/queue.html"); }  }
TabbedTargetInstanceController extends TabbedController { @Override protected ModelAndView processCancel(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors) { unbindContext(req); return new ModelAndView("redirect:/curator/target/queue.html"); }  void setTargetInstanceManager(TargetInstanceManager targetInstanceManager); void setHarvestCoordinator(HarvestCoordinator harvestCoordinator); void setAuthorityManager(AuthorityManager authorityManager); void setQueueController(QueueController queueController); void setMessageSource(MessageSource messageSource); }
TabbedTargetInstanceController extends TabbedController { @Override protected ModelAndView processCancel(Tab currentTab, HttpServletRequest req, HttpServletResponse res, Object comm, BindException errors) { unbindContext(req); return new ModelAndView("redirect:/curator/target/queue.html"); }  void setTargetInstanceManager(TargetInstanceManager targetInstanceManager); void setHarvestCoordinator(HarvestCoordinator harvestCoordinator); void setAuthorityManager(AuthorityManager authorityManager); void setQueueController(QueueController queueController); void setMessageSource(MessageSource messageSource);  }