GroupDatabaseController { @RequestMapping(value = "/dblist") public ServiceResult<List<DataBaseInfo>> getDBListByGroupId(@RequestParam("groupId") Long id) throws SQLException { return ServiceResult.success(dataBaseDao.getGroupDBsByGroup(id)); }  @RequestMapping(value = "/dblist") ServiceResult<List<DataBaseInfo>> getDBListByGroupId(@RequestParam("groupId") Long id); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddGroupDB.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateGroupDB.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteGroupDB.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/transfer", method = RequestMethod.PUT) ServiceResult<String> transfer(@Validated(TransferGroupDB.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors);  }
@Test public void getDBListByGroupId() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/groupdb/dblist") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }