Add tests for calling generate with a route object.