@Test
public void testCrossRoadsVoid_thru_segment6() {

	RoadPath path = new RoadPath();
	path.add(this.segment3, this.segment3.getBeginPoint());
	path.add(this.segment4);
	path.add(this.segment1);
	path.add(this.segment2);
	path.add(this.segment6, this.segment6.getEndPoint());
	path.add(this.segment8);
	CrossRoad cross;
	double distance = this.segment3.getLength()
						+this.segment4.getLength()
						+this.segment1.getLength()
						+this.segment2.getLength();
	Iterator<CrossRoad> iterator = path.crossRoads();
	assertTrue(iterator.hasNext());
	cross = iterator.next();
	assertNotNull(cross);
	assertEquals(this.segment2.getBeginPoint(), cross.connectionPoint);
	assertEpsilonEquals(distance, cross.distance);
	assertEpsilonEquals(distance, cross.distanceFromPreviousCrossRoad);
	assertSame(this.segment2, cross.enteringSegment);
	assertSame(this.segment6, cross.exitingSegment);
	distance += this.segment6.getLength();
	assertTrue(iterator.hasNext());
	cross = iterator.next();
	assertNotNull(cross);
	assertEquals(this.segment6.getEndPoint(), cross.connectionPoint);
	assertEpsilonEquals(distance, cross.distance);
	assertEpsilonEquals(this.segment6.getLength(), cross.distanceFromPreviousCrossRoad);
	assertSame(this.segment6, cross.enteringSegment);
	assertSame(this.segment8, cross.exitingSegment);
	distance += this.segment8.getLength();
	assertTrue(iterator.hasNext());
	cross = iterator.next();
	assertNotNull(cross);
	assertEquals(this.segment8.getBeginPoint(), cross.connectionPoint);
	assertEpsilonEquals(distance, cross.distance);
	assertEpsilonEquals(this.segment8.getLength(), cross.distanceFromPreviousCrossRoad);
	assertSame(this.segment8, cross.enteringSegment);
	assertNull(cross.exitingSegment);
	assertFalse(iterator.hasNext());
}