@Test
public void testMoveLegWorks() {

    Survey survey = BasicTestSurveyCreator.createStraightNorth();
    Leg toMove = survey.getStationByName("2").getOnwardLegs().get(0);
    Station originatingStation = survey.getOriginatingStation(toMove);
    Station destinationStation = survey.getStationByName("1");
    Assert.assertNotEquals(originatingStation, destinationStation);
    SurveyUpdater.moveLeg(survey, toMove, destinationStation);
    Assert.assertTrue(destinationStation.getOnwardLegs().contains(toMove));
    Assert.assertFalse(originatingStation.getOnwardLegs().contains(toMove));
}