@Test public void lookupLionUnknownLanguage() throws IOException { TaxonImage taxonImage = new WikiDataImageSearch().lookupImageForExternalId("WD:Q140", new SearchContext() { @Override public String getPreferredLanguage() { return "foo"; } }); assertNotNull(taxonImage); assertThat(taxonImage.getThumbnailURL(), startsWith("https: assertThat(taxonImage.getInfoURL(), is("https: assertThat(taxonImage.getCommonName(), is(nullValue())); }
@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);  }