// Step 3 - Verify cargo is on track
Leg plannedCarrierMovement = c.itinerary.leg( c.itineraryProgressIndex );
if( plannedCarrierMovement == null )
{
throw new InspectionFailedException( "Itinerary progress index '" + c.itineraryProgressIndex + "' is invalid!" );
}
Integer itineraryProgressIndex;
// if (c.wasMisdirected && c.unloadLocation.equals( c.routeSpecification.origin().get() ))
if( c.unloadLocation.equals( c.routeSpecification.origin().get() ) )