AdministrativeDivision implements AdministrativeEntity,GisFeature, CurrencyProvider { @Override public int hashCode() { return gisFeatureProvider.gisFeatureHashCode(); } 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 hashCodeShouldNotRetrieveCompleteGisFeatureFromProviderForEfficiencyReasons() { GisFeatureProvider gisFeatureProvider = Mockito.mock(GisFeatureProvider.class); when(gisFeatureProvider.gisFeatureHashCode()).thenReturn(1); when(gisFeatureProvider.getGisFeatureId()).thenReturn(new GisFeatureId(6444057L)); assertEquals(1, createRambouilletAdm4WithMockGisFeatureProvider(gisFeatureProvider).hashCode()); Mockito.verify(gisFeatureProvider).gisFeatureHashCode(); }