RaxaAlertController { @RequestMapping(method = RequestMethod.GET, params = "providerRecipient") @WSDoc("Fetch all non-retired alerts according to providerRecipient") @ResponseBody() public String searchByProviderRecipient(@RequestParam("providerRecipient") String providerRecipient, HttpServletRequest request) throws ResponseException { initRaxaAlertController(); return alertListToJson(service.getRaxaAlertByProviderRecipientUuid(providerRecipient, false)); }  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);  }
@Test public void searchByProviderRecipient_shouldGetAlertsByProvider() throws Exception { String results = controller.searchByProviderRecipient("68547121-1b70-465e-99ee-c9df45jf9j32", request); LinkedHashMap raxaAlert = (LinkedHashMap) ((ArrayList) SimpleObject.parseJson(results).get("results")).get(0); System.out.println(Context.getProviderService().getProvider(1).getUuid()); Assert.assertEquals("TestAlert1", raxaAlert.get("name")); }