@Test public void testNameAdvancesNumberOnPotentialBranch() { Survey testSurvey = BasicTestSurveyCreator.createStraightNorth(); String newName = StationNamer.generateNextStationName(testSurvey, testSurvey.getStationByName("1")); int numberOfStations = testSurvey.getAllStations().size(); Assert.assertEquals(Integer.toString(numberOfStations + 1), newName); }
public static String generateNextStationName(Survey survey, Station originatingStation) { String originatingName = originatingStation.getName(); String newUniqueName = advanceNumberIfNotUnique(survey, originatingName); return newUniqueName; }
StationNamer { public static String generateNextStationName(Survey survey, Station originatingStation) { String originatingName = originatingStation.getName(); String newUniqueName = advanceNumberIfNotUnique(survey, originatingName); return newUniqueName; } }
StationNamer { public static String generateNextStationName(Survey survey, Station originatingStation) { String originatingName = originatingStation.getName(); String newUniqueName = advanceNumberIfNotUnique(survey, originatingName); return newUniqueName; }  }
StationNamer { public static String generateNextStationName(Survey survey, Station originatingStation) { String originatingName = originatingStation.getName(); String newUniqueName = advanceNumberIfNotUnique(survey, originatingName); return newUniqueName; }  static String generateOriginName(); static String generateNextStationName(Survey survey, Station originatingStation); static String advanceNumberIfNotUnique(Survey survey, String candidateName); static Set<String> getAllStationNames(Survey survey); }
StationNamer { public static String generateNextStationName(Survey survey, Station originatingStation) { String originatingName = originatingStation.getName(); String newUniqueName = advanceNumberIfNotUnique(survey, originatingName); return newUniqueName; }  static String generateOriginName(); static String generateNextStationName(Survey survey, Station originatingStation); static String advanceNumberIfNotUnique(Survey survey, String candidateName); static Set<String> getAllStationNames(Survey survey);  }