def METHOD_NAME(self):
    # Test that an 'index' coord is added to the resultant cube.
    cube = simple_3d()
    waypoints = [
        {"latitude": 40, "longitude": 40},
        {"latitude": 0, "longitude": 0},
    ]
    sample_count = 3
    new_coord_name = "index"
    trajectory = Trajectory(waypoints, sample_count=sample_count)
    result = trajectory.interpolate(cube)
    dim_names, named_dims, anon_dims = self._result_cube_metadata(result)
    new_coord = result.coord(new_coord_name)
    exp_named_dims = [0, 1]
    self.assertEqual(result.ndim, cube.ndim - 1)
    self.assertIn(new_coord_name, dim_names)
    self.assertEqual(named_dims, exp_named_dims)
    self.assertIsNone(anon_dims)
    self.assertEqual(len(new_coord.points), sample_count)