### Question:
GeoContext extends AbstractModelList<GeoRole> { public void addGeoRole( GeoRole geoRole ) { if ( geoRole != null ) { children.add( geoRole ); } } GeoContext(); GeoRole getGeoRole( int index ); void addGeoRole( GeoRole geoRole ); String getDimensionName(); void setDimensionName( String dimensionName ); GeoRole matchFieldToGeoRole( AvailableField field ); GeoRole matchColumnToGeoRole( IPhysicalColumn column ); List<DimensionMetaData> buildDimensions( ModelerWorkspace workspace ); LocationRole getLocationRole(); GeoRole getGeoRoleByName( String name ); void setLocationFields( ModelerWorkspace workspace, LevelMetaData locationLevel ); void setLocationFields( ModelerWorkspace workspace, LevelMetaData locationLevel,
                                 String latitudeFieldName, String longitudeFieldName ); static final String LATITUDE; static final String LONGITUDE; static final String ANNOTATION_DATA_ROLE; static final String ANNOTATION_GEO_ROLE; static final String ANNOTATION_GEO_PARENTS; }### Answer:
@Test public void addGeoRole() { GeoContext geo = new GeoContext(); assertEquals( 0, geo.size() ); geo.addGeoRole( new GeoRole( "country", Arrays.asList( new String[] { "country, ctry" } ) ) ); geo.addGeoRole( new GeoRole( "state", Arrays.asList( new String[] { "state, st, province" } ) ) ); geo.addGeoRole( new GeoRole( "city", Arrays.asList( new String[] { "city, town" } ) ) ); assertEquals( 3, geo.size() ); assertEquals( "country", geo.getGeoRole( 0 ).getName() ); assertEquals( "state", geo.getGeoRole( 1 ).getName() ); assertEquals( "city", geo.getGeoRole( 2 ).getName() ); }