@Test public void shouldSaveBootstrapConfig() throws Exception { when(messageBrokerTestService.pingBroker("tcp: .thenReturn(true); mockMvc.perform(MockMvcRequestBuilders.post("/bootstrap/") .param("sqlUrl", "jdbc:mysql: .param("sqlDriver", "com.mysql.jdbc.Driver") .param("sqlUsername", "some_username") .param("sqlPassword", "some_password") .param("configSource", "UI") .param("queueUrl","tcp: .andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.view().name("bootstrapconfig")) .andExpect(MockMvcResultMatchers.model().attribute("redirect", true)); BootstrapConfig expectedConfigToSave = new BootstrapConfig(new SQLDBConfig("jdbc:mysql: PowerMockito.verifyStatic(times(1)); OsgiListener.saveBootstrapConfig(expectedConfigToSave); }
@RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody public PlatformStatus status() { return OsgiListener.getOsgiService().getCurrentPlatformStatus(); }
BootstrapController { @RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody public PlatformStatus status() { return OsgiListener.getOsgiService().getCurrentPlatformStatus(); } }
BootstrapController { @RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody public PlatformStatus status() { return OsgiListener.getOsgiService().getCurrentPlatformStatus(); }  }
BootstrapController { @RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody public PlatformStatus status() { return OsgiListener.getOsgiService().getCurrentPlatformStatus(); }  @RequestMapping(value = "/", method = RequestMethod.GET) ModelAndView bootstrapForm(); @RequestMapping(value = "/", method = RequestMethod.POST) ModelAndView submitForm(@ModelAttribute(BOOTSTRAP_CONFIG) @Valid BootstrapConfigForm form, BindingResult result,
                                   HttpServletRequest request); @RequestMapping(value = "/verifySql", method = RequestMethod.POST) @ResponseBody Map<String, ?> verifySqlConnection(@ModelAttribute(BOOTSTRAP_CONFIG) @Valid BootstrapConfigForm form,
                                              BindingResult result, HttpServletRequest request); @RequestMapping(value = "/verifyAmq", method = RequestMethod.POST) @ResponseBody Map<String, ?> verifyAmqConnection(@ModelAttribute(BOOTSTRAP_CONFIG) @Valid BootstrapConfigForm form,
                                              BindingResult result, HttpServletRequest request); @RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody PlatformStatus status(); }
BootstrapController { @RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody public PlatformStatus status() { return OsgiListener.getOsgiService().getCurrentPlatformStatus(); }  @RequestMapping(value = "/", method = RequestMethod.GET) ModelAndView bootstrapForm(); @RequestMapping(value = "/", method = RequestMethod.POST) ModelAndView submitForm(@ModelAttribute(BOOTSTRAP_CONFIG) @Valid BootstrapConfigForm form, BindingResult result,
                                   HttpServletRequest request); @RequestMapping(value = "/verifySql", method = RequestMethod.POST) @ResponseBody Map<String, ?> verifySqlConnection(@ModelAttribute(BOOTSTRAP_CONFIG) @Valid BootstrapConfigForm form,
                                              BindingResult result, HttpServletRequest request); @RequestMapping(value = "/verifyAmq", method = RequestMethod.POST) @ResponseBody Map<String, ?> verifyAmqConnection(@ModelAttribute(BOOTSTRAP_CONFIG) @Valid BootstrapConfigForm form,
                                              BindingResult result, HttpServletRequest request); @RequestMapping(value = "/status", method = RequestMethod.GET) @ResponseBody PlatformStatus status(); static final String BOOTSTRAP_CONFIG_VIEW; static final String REDIRECT_HOME; }