### Question:
GeoNamesServiceImpl implements GeoNamesService { @Override public LatLng findLatLng(String geoNameTermOrLocale) throws IOException { LatLng point = pointCache.get(geoNameTermOrLocale); return point == null ? getCentroid(geoNameTermOrLocale) : point; }  @Override boolean hasTermForLocale(String locality); @Override LatLng findLatLng(String geoNameTermOrLocale); static Long parseGeoId(String idString); LatLng getCentroid(Long id); static final TermImpl GEO_TERM_EARTH; }### Answer:
@Test public void assertPacific() throws IOException { LatLng point = new GeoNamesServiceImpl().findLatLng("Country: Pacific"); assertThat(point.getLat(), is(3.51342)); assertThat(point.getLng(), is(-132.1875)); }
@Test public void assertEarth() throws IOException { LatLng point = new GeoNamesServiceImpl().findLatLng("Country: General; Locality: General"); assertNull(point); }
@Test public void retrievePointForNonExistingSpireLocality() throws IOException { LatLng point = new GeoNamesServiceImpl().findLatLng("Blabla: mickey mouse"); assertThat(point, is(nullValue())); }
@Test public void retrievePointForIgnoredLocality() throws IOException { LatLng point = new GeoNamesServiceImpl().findLatLng("Country: General; Locality: General"); assertThat(point, is(nullValue())); }
@Test public void findPointForLocalitys() throws IOException { LatLng point = new GeoNamesServiceImpl().findLatLng("Kerguelen Island"); assertThat(point, is(notNullValue())); }