SentinelUpdateController { @RequestMapping(value = "/sentinel/address", method = RequestMethod.PUT) public RetMessage updateSentinelAddr(@RequestBody SentinelModel model) { logger.info("[updateSentinelAddr][begin]"); try { SentinelModel updated = sentinelService.updateSentinelTblAddr(model); return RetMessage.createSuccessMessage(jsonTool.encode(updated)); } catch (Exception e) { logger.error("[updateSentinelAddr]", e); return RetMessage.createFailMessage(e.getMessage()); } }  @RequestMapping(value = "/rebalance/sentinels/{dcName}/{numOfClusters}", method = RequestMethod.POST) RetMessage reBalanceSentinels(@PathVariable String dcName, @PathVariable int numOfClusters); @RequestMapping(value = "/rebalance/sentinels/force/{dcName}/{numOfClusters}", method = RequestMethod.POST) RetMessage reBalanceSentinelsForce(@PathVariable String dcName, @PathVariable int numOfClusters); @RequestMapping(value = "/sentinels", method = RequestMethod.POST) RetMessage addSentinel(@RequestBody SentinelModel sentinelModel); @RequestMapping(value = "/sentinels/{sentinelId}", method = RequestMethod.DELETE) RetMessage deleteSentinel(@PathVariable Long sentinelId); @RequestMapping(value = "/sentinels/{sentinelId}", method = RequestMethod.PATCH) RetMessage rehealSentinel(@PathVariable Long sentinelId); @RequestMapping(value = "/rebalance/sentinels/{dcName}", method = RequestMethod.POST) RetMessage reBalanceSentinels(@PathVariable String dcName, @RequestBody(required = false) List<String> clusterNames); @RequestMapping(value = "/sentinels/usage", method = RequestMethod.GET) RetMessage sentinelUsage(); @RequestMapping(value = "/sentinel/address", method = RequestMethod.PUT) RetMessage updateSentinelAddr(@RequestBody SentinelModel model); @RequestMapping(value = "/sentinel/monitor/{clusterName}", method = RequestMethod.DELETE) RetMessage removeSentinelMonitor(@PathVariable String clusterName);  }
@Test public void testSentinelUpdate() { RetMessage message = controller.updateSentinelAddr(new SentinelModel()); logger.info("{}", message.getState()); }