ConfigController { @RequestMapping(value = "/datasourceValid", method = RequestMethod.GET) public ServiceResult<String> datasourceValid() { return configService.ckeckLoader(); }  @RequestMapping(value = "/datasourceValid", method = RequestMethod.GET) ServiceResult<String> datasourceValid(); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@RequestBody DataBaseInfo dataBaseInfo); @RequestMapping(value = "/env") ServiceResult<String> env(HttpServletRequest request, @CurrentUser LoginUser user);  }
@Test public void datasourceValid() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/config/datasourceValid") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }