@Test
public final void testLaneSegmentIterator() {

    RoadSegment.resetNextId();
    Vehicle.resetNextId();
    final int laneCount = 3;
    final RoadSegment r0 = new RoadSegment(1000.0, laneCount);
    final Iterator<LaneSegment> iterator = r0.laneSegmentIterator();
    assertEquals(true, iterator.hasNext());
    LaneSegment laneSegment = r0.laneSegment(Lanes.LANE1);
    LaneSegment next = iterator.next();
    assertEquals(laneSegment.lane(), next.lane());
    assertEquals(true, iterator.hasNext());
    laneSegment = r0.laneSegment(Lanes.LANE2);
    next = iterator.next();
    assertEquals(laneSegment.lane(), next.lane());
    assertEquals(true, iterator.hasNext());
    laneSegment = r0.laneSegment(Lanes.LANE3);
    next = iterator.next();
    assertEquals(laneSegment.lane(), next.lane());
}