@Test public void replaceFullWithPrefix() { Optional<String> s = ImageService.replaceFullWithPrefix(Collections.singletonList("https: assertThat(s.get(), is("WD:Q1390")); }
static Optional<String> replaceFullWithPrefix(Collection<String> links) { return replaceWithPrefix(links) .findFirst(); }
ImageService { static Optional<String> replaceFullWithPrefix(Collection<String> links) { return replaceWithPrefix(links) .findFirst(); } }
ImageService { static Optional<String> replaceFullWithPrefix(Collection<String> links) { return replaceWithPrefix(links) .findFirst(); }  }
ImageService { static Optional<String> replaceFullWithPrefix(Collection<String> links) { return replaceWithPrefix(links) .findFirst(); }  @RequestMapping(value = "/imagesForName/{scientificName}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody TaxonImage findTaxonImagesForTaxonWithName(
            @PathVariable("scientificName") String scientificName,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); @RequestMapping(value = "/imagesForName", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody TaxonImage findTaxonImagesForTaxonWithName2(
            @RequestParam(value = "name", required = false) String[] names,
            @RequestParam(value = "externalId", required = false) String[] externalIds,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); @RequestMapping(value = "/imagesForNames", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody List<TaxonImage> findImagesForNames(
            @RequestParam(value = "name") String[] names,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); @RequestMapping(value = "/images/{externalId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody TaxonImage findTaxonImagesForExternalId(
            @PathVariable("externalId") String externalId,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); }
ImageService { static Optional<String> replaceFullWithPrefix(Collection<String> links) { return replaceWithPrefix(links) .findFirst(); }  @RequestMapping(value = "/imagesForName/{scientificName}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody TaxonImage findTaxonImagesForTaxonWithName(
            @PathVariable("scientificName") String scientificName,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); @RequestMapping(value = "/imagesForName", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody TaxonImage findTaxonImagesForTaxonWithName2(
            @RequestParam(value = "name", required = false) String[] names,
            @RequestParam(value = "externalId", required = false) String[] externalIds,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); @RequestMapping(value = "/imagesForNames", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody List<TaxonImage> findImagesForNames(
            @RequestParam(value = "name") String[] names,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage); @RequestMapping(value = "/images/{externalId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8") @ResponseBody TaxonImage findTaxonImagesForExternalId(
            @PathVariable("externalId") String externalId,
            @RequestParam(value = "lang", required = false, defaultValue = "en") String preferredLanguage);  }