@Test public void findExternalLinkForTaxonWithNonExistingName() throws IOException { String externalLink = new CypherProxyController().findExternalLinkForTaxonWithName(null, "This aint exist yet"); assertThat(externalLink, is("{}")); }
@RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName) throws IOException { return ExternalIdUtil.getUrlFromExternalId(CypherUtil.executeRemote(findExternalIdForTaxonNew(request, taxonName))); }
CypherProxyController { @RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName) throws IOException { return ExternalIdUtil.getUrlFromExternalId(CypherUtil.executeRemote(findExternalIdForTaxonNew(request, taxonName))); } }
CypherProxyController { @RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName) throws IOException { return ExternalIdUtil.getUrlFromExternalId(CypherUtil.executeRemote(findExternalIdForTaxonNew(request, taxonName))); }  }
CypherProxyController { @RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName) throws IOException { return ExternalIdUtil.getUrlFromExternalId(CypherUtil.executeRemote(findExternalIdForTaxonNew(request, taxonName))); }  @RequestMapping(value = "/locations", method = RequestMethod.GET) @ResponseBody CypherQuery locationsNew(HttpServletRequest request); @RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName); @RequestMapping(value = "/findExternalUrlForStudy/{studyTitle}", method = RequestMethod.GET, produces = "application/json") @ResponseBody String findExternalLinkForStudyWithTitle(HttpServletRequest request, @PathVariable("studyTitle") String taxonName); @RequestMapping(value = "/findExternalIdForTaxon/{taxonName}", method = RequestMethod.GET) @ResponseBody CypherQuery findExternalIdForTaxonNew(HttpServletRequest request, @PathVariable("taxonName") final String taxonName); @RequestMapping(value = "/findExternalIdForStudy/{studyTitle}", method = RequestMethod.GET) @ResponseBody CypherQuery findExternalIdForStudyNew(HttpServletRequest request, @PathVariable("studyTitle") final String studyTitle); @RequestMapping(value = "/findExternalUrlForExternalId/{externalId}", method = RequestMethod.GET, produces = "application/json") @ResponseBody String findExternalLinkForExternalId(@PathVariable("externalId") String externalId); @RequestMapping(value = "/shortestPathsBetweenTaxon/{startTaxon}/andTaxon/{endTaxon}", method = RequestMethod.GET) @ResponseBody CypherQuery findShortestPathsNew(HttpServletRequest request, @PathVariable("startTaxon") final String startTaxon,
                                            @PathVariable("endTaxon") final String endTaxon); }
CypherProxyController { @RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName) throws IOException { return ExternalIdUtil.getUrlFromExternalId(CypherUtil.executeRemote(findExternalIdForTaxonNew(request, taxonName))); }  @RequestMapping(value = "/locations", method = RequestMethod.GET) @ResponseBody CypherQuery locationsNew(HttpServletRequest request); @RequestMapping(value = "/findExternalUrlForTaxon/{taxonName}", method = RequestMethod.GET, produces = "application/json") @ResponseBody String findExternalLinkForTaxonWithName(HttpServletRequest request, @PathVariable("taxonName") String taxonName); @RequestMapping(value = "/findExternalUrlForStudy/{studyTitle}", method = RequestMethod.GET, produces = "application/json") @ResponseBody String findExternalLinkForStudyWithTitle(HttpServletRequest request, @PathVariable("studyTitle") String taxonName); @RequestMapping(value = "/findExternalIdForTaxon/{taxonName}", method = RequestMethod.GET) @ResponseBody CypherQuery findExternalIdForTaxonNew(HttpServletRequest request, @PathVariable("taxonName") final String taxonName); @RequestMapping(value = "/findExternalIdForStudy/{studyTitle}", method = RequestMethod.GET) @ResponseBody CypherQuery findExternalIdForStudyNew(HttpServletRequest request, @PathVariable("studyTitle") final String studyTitle); @RequestMapping(value = "/findExternalUrlForExternalId/{externalId}", method = RequestMethod.GET, produces = "application/json") @ResponseBody String findExternalLinkForExternalId(@PathVariable("externalId") String externalId); @RequestMapping(value = "/shortestPathsBetweenTaxon/{startTaxon}/andTaxon/{endTaxon}", method = RequestMethod.GET) @ResponseBody CypherQuery findShortestPathsNew(HttpServletRequest request, @PathVariable("startTaxon") final String startTaxon,
                                            @PathVariable("endTaxon") final String endTaxon);  }