@Test public void getRaxaAlertByUuid_shouldGetADefaultRepresentationOfARaxaAlert() throws Exception { String result = controller.getRaxaAlertByUuid(getUuid(), request); SimpleObject RaxaAlert = SimpleObject.parseJson(result); Assert.assertNotNull(result); Assert.assertEquals("68547121-1b70-465e-99ee-c9dfd95e7d31", RaxaAlert.get("uuid")); Assert.assertEquals("TestAlert1", RaxaAlert.get("name")); }
@RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() public String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initRaxaAlertController(); RaxaAlert rAlert = service.getRaxaAlertByUuid(uuid); return gson.toJson(getFieldsFromRaxaAlert(rAlert)); }
RaxaAlertController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() public String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initRaxaAlertController(); RaxaAlert rAlert = service.getRaxaAlertByUuid(uuid); return gson.toJson(getFieldsFromRaxaAlert(rAlert)); } }
RaxaAlertController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() public String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initRaxaAlertController(); RaxaAlert rAlert = service.getRaxaAlertByUuid(uuid); return gson.toJson(getFieldsFromRaxaAlert(rAlert)); }  }
RaxaAlertController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() public String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initRaxaAlertController(); RaxaAlert rAlert = service.getRaxaAlertByUuid(uuid); return gson.toJson(getFieldsFromRaxaAlert(rAlert)); }  void initRaxaAlertController(); @RequestMapping(method = RequestMethod.POST) @WSDoc("Save New RaxaAlert") @ResponseBody Object createNewRaxaAlert(@RequestBody SimpleObject post, HttpServletRequest request, HttpServletResponse response); @RequestMapping(method = RequestMethod.GET) @WSDoc("Get All Unretired Raxa Alerts in the system") @ResponseBody() String getAllRaxaAlerts(HttpServletRequest request, HttpServletResponse response); @RequestMapping(method = RequestMethod.GET, params = "providerRecipient") @WSDoc("Fetch all non-retired alerts according to providerRecipient") @ResponseBody() String searchByProviderRecipient(@RequestParam("providerRecipient") String providerRecipient,
	        HttpServletRequest request); @RequestMapping(method = RequestMethod.GET, params = "toLocation") @WSDoc("Fetch all non-retired alerts according to toLocation") @ResponseBody() String searchByToLocation(@RequestParam("toLocation") String toLocation, HttpServletRequest request); @RequestMapping(value = "/{uuid}", method = RequestMethod.POST) @WSDoc("Updates an existing raxa alert") @ResponseBody Object updateRaxaAlert(@PathVariable("uuid") String uuid, @RequestBody SimpleObject post,
	        HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request); }
RaxaAlertController { @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() public String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request) throws ResponseException { initRaxaAlertController(); RaxaAlert rAlert = service.getRaxaAlertByUuid(uuid); return gson.toJson(getFieldsFromRaxaAlert(rAlert)); }  void initRaxaAlertController(); @RequestMapping(method = RequestMethod.POST) @WSDoc("Save New RaxaAlert") @ResponseBody Object createNewRaxaAlert(@RequestBody SimpleObject post, HttpServletRequest request, HttpServletResponse response); @RequestMapping(method = RequestMethod.GET) @WSDoc("Get All Unretired Raxa Alerts in the system") @ResponseBody() String getAllRaxaAlerts(HttpServletRequest request, HttpServletResponse response); @RequestMapping(method = RequestMethod.GET, params = "providerRecipient") @WSDoc("Fetch all non-retired alerts according to providerRecipient") @ResponseBody() String searchByProviderRecipient(@RequestParam("providerRecipient") String providerRecipient,
	        HttpServletRequest request); @RequestMapping(method = RequestMethod.GET, params = "toLocation") @WSDoc("Fetch all non-retired alerts according to toLocation") @ResponseBody() String searchByToLocation(@RequestParam("toLocation") String toLocation, HttpServletRequest request); @RequestMapping(value = "/{uuid}", method = RequestMethod.POST) @WSDoc("Updates an existing raxa alert") @ResponseBody Object updateRaxaAlert(@PathVariable("uuid") String uuid, @RequestBody SimpleObject post,
	        HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = "/{uuid}", method = RequestMethod.GET) @WSDoc("Gets Raxa Alert for the given uuid") @ResponseBody() String getRaxaAlertByUuid(@PathVariable("uuid") String uuid, HttpServletRequest request);  }