Test the new functions in Trajectory

Fix #260.