AdministrativeDivision implements AdministrativeEntity,GisFeature, CurrencyProvider { public static AdministrativeDivisionBuilder administrativeDivision(String name) { return new AdministrativeDivisionBuilder(name); } private  AdministrativeDivision(String name, String code, GisFeatureProvider gisFeatureProvider); static AdministrativeDivisionBuilder administrativeDivision(String name); String getName(); String getCode(); GisFeature getGisFeature(); AdministrativeEntity getParentEntity(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); int getAdminitrativeDivisionLevel(); AdministrativeEntity getParentAdministrativeEntity(); AdministrativeEntity getAdministrativeEntity(int level); Long getGeonamesId(); ImmutableSet<AlternateGisFeatureName> getGisFeatureAlternateNames(); String getGisFeatureDefaultName(); String getGisFeaturePreferredName(Iso639Language language); String getGisFeatureShortName(Iso639Language language); Country getCountry(); Long getElevation(); GisFeatureType getGisFeatureType(); Long getGtopo30AverageElevation(); DateTime getLastModificationDate(); double getLatitude(); Point getLocation(); double getLongitude(); Long getPopulation(); DateTimeZone getTimeZone(); Currency getCurrency(); ImmutableList<NamePart> getFullyQualifiedNameParts(); String getFriendlyCode();  }
@Test public void shouldCreateAdministrativeDivisionUsingGisFeatureProvider() { AdministrativeDivision rambouilletAdm4 = administrativeDivision("Rambouillet") .withCode("78517") .andGisFeatureProvider(new InMemoryGeonamesGisFeatureProvider(rambouilletAdm4GisFeature())); assertRambouilletAdm4(rambouilletAdm4); }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateAdministrativeDivisionWithNullName() { administrativeDivision(null) .withCode("78517") .andGisFeature(rambouilletAdm4GisFeature()); }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateAdministrativeDivisionWithEmptyName() { administrativeDivision("") .withCode("78517") .andGisFeature(rambouilletAdm4GisFeature()); }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateAdministrativeDivisionWithNullCode() { administrativeDivision("Rambouillet") .withCode(null) .andGisFeature(rambouilletAdm4GisFeature()); }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateAdministrativeDivisionWithEmptyCode() { administrativeDivision("Rambouillet") .withCode("") .andGisFeature(rambouilletAdm4GisFeature()); }
@Test(expected=IllegalArgumentException.class) public void shouldNotCreateAdministrativeDivisionWithNullGisFeature() { administrativeDivision("Rambouillet") .withCode("78517") .andGisFeature(null); }