@Test public void testStartupRedirectToHome() { when(startupManager.canLaunchBundles()).thenReturn(true); ModelAndView result = startupController.startup(); assertEquals("redirect:home", result.getViewName()); }
@RequestMapping(value = "/startup", method = RequestMethod.GET) public ModelAndView startup() { ModelAndView view = new ModelAndView("startup"); if (startupManager.canLaunchBundles()) { view.setViewName(REDIRECT_HOME); } return view; }
StartupController { @RequestMapping(value = "/startup", method = RequestMethod.GET) public ModelAndView startup() { ModelAndView view = new ModelAndView("startup"); if (startupManager.canLaunchBundles()) { view.setViewName(REDIRECT_HOME); } return view; } }
StartupController { @RequestMapping(value = "/startup", method = RequestMethod.GET) public ModelAndView startup() { ModelAndView view = new ModelAndView("startup"); if (startupManager.canLaunchBundles()) { view.setViewName(REDIRECT_HOME); } return view; }  }
StartupController { @RequestMapping(value = "/startup", method = RequestMethod.GET) public ModelAndView startup() { ModelAndView view = new ModelAndView("startup"); if (startupManager.canLaunchBundles()) { view.setViewName(REDIRECT_HOME); } return view; }  @RequestMapping(value = "/startupviewdata", method = RequestMethod.GET) @ResponseBody StartupViewData getStartupViewData(final HttpServletRequest request); @RequestMapping(value = "/startup", method = RequestMethod.GET) ModelAndView startup(); @RequestMapping(value = "/startup", method = RequestMethod.POST) @ResponseBody List<String> submitForm(@RequestBody StartupForm startupSettings); void setStartupFormValidatorFactory(StartupFormValidatorFactory validatorFactory); }
StartupController { @RequestMapping(value = "/startup", method = RequestMethod.GET) public ModelAndView startup() { ModelAndView view = new ModelAndView("startup"); if (startupManager.canLaunchBundles()) { view.setViewName(REDIRECT_HOME); } return view; }  @RequestMapping(value = "/startupviewdata", method = RequestMethod.GET) @ResponseBody StartupViewData getStartupViewData(final HttpServletRequest request); @RequestMapping(value = "/startup", method = RequestMethod.GET) ModelAndView startup(); @RequestMapping(value = "/startup", method = RequestMethod.POST) @ResponseBody List<String> submitForm(@RequestBody StartupForm startupSettings); void setStartupFormValidatorFactory(StartupFormValidatorFactory validatorFactory);  }