@Test
public void testGetDistanceFromStart() {

   	assertEpsilonEquals(0.,this.testedSegment.getDistanceFromStart(0));
   	assertEpsilonEquals(0.,this.firstNeighbour.getDistanceFromStart(0));
   	assertEpsilonEquals(0.,this.secondNeighbour.getDistanceFromStart(0));
   	assertEpsilonEquals(0.,this.loopSegment.getDistanceFromStart(0));
   	assertEpsilonEquals(0.,this.thirdNeighbour.getDistanceFromStart(0));
   	//
   	assertEpsilonEquals(this.testedSegment.getOriginalLength(),this.testedSegment.getDistanceFromStart(1));
   	assertEpsilonEquals(this.firstNeighbour.getOriginalLength(),this.firstNeighbour.getDistanceFromStart(1));
   	assertEpsilonEquals(this.secondNeighbour.getOriginalLength(),this.secondNeighbour.getDistanceFromStart(1));
   	assertEpsilonEquals(this.loopSegment.getOriginalLength(),this.loopSegment.getDistanceFromStart(1));
   	assertEpsilonEquals(this.thirdNeighbour.getOriginalLength(),this.thirdNeighbour.getDistanceFromStart(1));
   	//
   	Random rnd = new Random();
   	double ratio;
   	for(int i=0; i<TEST_COUNT; ++i) {
   		ratio = rnd.nextDouble();
   		assertEpsilonEquals(this.testedSegment.getOriginalStartDistance(ratio),this.testedSegment.getDistanceFromStart(ratio));
   		assertEpsilonEquals(this.firstNeighbour.getOriginalStartDistance(ratio),this.firstNeighbour.getDistanceFromStart(ratio));
   		assertEpsilonEquals(this.secondNeighbour.getOriginalStartDistance(ratio),this.secondNeighbour.getDistanceFromStart(ratio));
   		assertEpsilonEquals(this.loopSegment.getOriginalStartDistance(ratio),this.loopSegment.getDistanceFromStart(ratio));
   		assertEpsilonEquals(this.thirdNeighbour.getOriginalStartDistance(ratio),this.thirdNeighbour.getDistanceFromStart(ratio));
   	}
}