@Test
public void testIsEndingBusHalt() {

	this.halt = this.itinerary.addBusHalt("HALT1", BusItineraryHaltType.STOP_ON_DEMAND); //$NON-NLS-1$
	assertFalse(this.halt.isEndingBusHalt());
	this.itinerary.addRoadSegment(this.segment1);
	assertFalse(this.halt.isEndingBusHalt());
	this.itinerary.addRoadSegment(this.segment2);
	assertFalse(this.halt.isEndingBusHalt());
	this.stop.setPosition(new GeoLocationPoint(10., 10.));
	assertFalse(this.halt.isEndingBusHalt());
	this.halt.setBusStop(this.stop);
	assertFalse(this.halt.isEndingBusHalt());
	this.halt.setRoadSegmentIndex(1);
	this.halt.checkPrimitiveValidity();
	assertFalse(this.halt.isEndingBusHalt());
	this.halt.setPositionOnSegment(1f);
	this.halt.checkPrimitiveValidity();
	assertFalse(this.halt.isEndingBusHalt());
	BusStop tmpStop = new BusStopStub(this.busNetwork, "STOP_TMP"); //$NON-NLS-1$
	tmpStop.setPosition(new GeoLocationPoint(-10., -10.));
	BusItineraryHalt tmpHalt = this.itinerary.addBusHalt("HALT_TMP", BusItineraryHaltType.STOP_ON_DEMAND); //$NON-NLS-1$
	tmpHalt.setBusStop(tmpStop);
	tmpHalt.setRoadSegmentIndex(0);
	tmpHalt.setPositionOnSegment(1f);
	tmpHalt.checkPrimitiveValidity();
	assertTrue(this.halt.isEndingBusHalt());
}