AxisMapping { public void replaceAlias(String beforeName, String changedName) { replaceAliasInMap(beforeName, changedName, rasterMap); replaceAliasInMap(beforeName, changedName, insituMap); fireEvent(); }  List<String> getInsituNames(String alias); List<String> getRasterNames(String alias); void addRasterName(String alias, String rasterName); void addInsituName(String alias, String insituName); void removeAlias(String alias); void addAlias(String alias); void removeInsituName(String alias, String insituName); void removeRasterName(String alias, String rasterName); Set<String> getAliasNames(); void replaceAlias(String beforeName, String changedName); String getRasterAlias(String rasterName); String getInsituAlias(String insituName); void addAxisMappingListener(AxisMappingListener axisMappingListener); int getRasterCount(); int getInsituCount();  }
@Test public void testReplaceAlias() throws Exception { axisMapping.addRasterName("alias", "RName"); axisMapping.addInsituName("alias", "IName"); axisMapping.replaceAlias("alias", "replaced"); final Set<String> aliasNames = axisMapping.getAliasNames(); assertEquals(1, aliasNames.size()); assertEquals("replaced", aliasNames.iterator().next()); assertEquals("RName", axisMapping.getRasterNames("replaced").iterator().next()); assertEquals("IName", axisMapping.getInsituNames("replaced").iterator().next()); }