City implements Comparable<City>, GisFeature, DistanceCalculator<City>, AdministrativeEntity, CurrencyProvider { public static City forFeature(GeonamesGisFeature gisFeature) { return new City(new InMemoryGeonamesGisFeatureProvider(gisFeature)); } private  City(GisFeatureProvider gisFeatureProvider); static City forFeature(GeonamesGisFeature gisFeature); static City forGisFeatureProvider(GisFeatureProvider gisFeatureProvider); int compareTo(City o); String getName(); @Override int hashCode(); @Override boolean equals(Object obj); ImmutableSet<AlternateGisFeatureName> getGisFeatureAlternateNames(); GisFeature getGisFeature(); Long getGeonamesId(); String getGisFeatureDefaultName(); String getGisFeaturePreferredName(Iso639Language language); String getGisFeatureShortName(Iso639Language language); AdministrativeEntity getParentAdministrativeEntity(); Long getElevation(); GisFeatureType getGisFeatureType(); Long getGtopo30AverageElevation(); DateTime getLastModificationDate(); double getLatitude(); Point getLocation(); double getLongitude(); Long getPopulation(); DateTimeZone getTimeZone(); double distance(City o, Unit<Length> unit); AdministrativeEntity getAdministrativeEntity(int level); int getAdminitrativeDivisionLevel(); Country getCountry(); Currency getCurrency(); ImmutableList<NamePart> getFullyQualifiedNameParts(); String getFriendlyCode(); String formatName(NameFormatter nameFormatter);  }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateCityWithNullGisFeature() { City.forFeature(null); }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateCityWithGisFeatureThatHasNotParentEntity() { City.forFeature(gisfeatureThatDoesNotHaveAnyParentEntity()); }