@Test public void lookupLionJapanese() throws IOException { TaxonImage taxonImage = new WikiDataImageSearch().lookupImageForExternalId("WD:Q140", new SearchContext() { @Override public String getPreferredLanguage() { return "ja"; } }); assertNotNull(taxonImage); assertThat(taxonImage.getThumbnailURL(), startsWith("https: assertThat(taxonImage.getInfoURL(), is("https: assertThat(taxonImage.getCommonName(), is("ライオン (raion) @ja")); }
@Override public TaxonImage lookupImageForExternalId(String externalId) throws IOException { return lookupImageForExternalId(externalId, () -> "en"); }
WikiDataImageSearch implements ImageSearch { @Override public TaxonImage lookupImageForExternalId(String externalId) throws IOException { return lookupImageForExternalId(externalId, () -> "en"); } }
WikiDataImageSearch implements ImageSearch { @Override public TaxonImage lookupImageForExternalId(String externalId) throws IOException { return lookupImageForExternalId(externalId, () -> "en"); }  }
WikiDataImageSearch implements ImageSearch { @Override public TaxonImage lookupImageForExternalId(String externalId) throws IOException { return lookupImageForExternalId(externalId, () -> "en"); }  @Override TaxonImage lookupImageForExternalId(String externalId); @Override TaxonImage lookupImageForExternalId(String externalId, SearchContext context); }
WikiDataImageSearch implements ImageSearch { @Override public TaxonImage lookupImageForExternalId(String externalId) throws IOException { return lookupImageForExternalId(externalId, () -> "en"); }  @Override TaxonImage lookupImageForExternalId(String externalId); @Override TaxonImage lookupImageForExternalId(String externalId, SearchContext context);  }