@Test
public void shouldIterateOverAllSegmentsReturnedByList() {

    Iterator<Path.Segment> expectedIter = validSegmentsList.iterator();
    for (Path.Segment segment : path) {
        assertThat(segment, is(expectedIter.next()));
    }
    expectedIter = path.getSegmentsList().iterator();
    for (Path.Segment segment : path) {
        assertThat(segment, is(expectedIter.next()));
    }
}