GeoNamesCityRepository implements CityRepository { @Override public Country getCountry(String iso2orIso3) throws IllegalArgumentException { return countryRepo.getCountry(iso2orIso3); } GeoNamesCityRepository(final Set<String> upExcludedCountryCodes, CountryRepository countryRepo);  GeoNamesCityRepository(CountryRepository countryRepo); @Override @Nullable City getCity(String countryCodeNormalizedProvinceAndName); @Override String getKeyForCity(City city); @Override City getCity(String name, @Nullable String province, String countryCode); @Override Country getCountry(String iso2orIso3); @Override Page<City> searchCity(String term, Pageable pageable); @Override Page<City> searchCity(String term, String province, Pageable pageable); @Override Page<City> searchCity(String term, @Nullable String province, @Nullable String countryIso, Pageable pageable); @Override City putCity(String name, String normalizedName, String countryCode, @Nullable String provinceName); void putCitiesFromDistrictTsv(final String countryIso, URL url); @Override long count(); static final String CITIES1000LITE_CSV; }
@Test public void getCountryID() { assertEquals("Indonesia", cityRepo.getCountry("ID").getName()); }