def METHOD_NAME(self):
    self.api_event_source.Path = "/foo/"
    cfn = self.api_event_source.to_cloudformation(function=self.func, explicit_api={}, api_id="RestApi")
    perm = cfn[0]
    self.assertIsInstance(perm, LambdaPermission)
    try:
        arn = self._extract_path_from_arn(f"{self.logical_id}PermissionProd", perm)
    except AttributeError:
        self.fail("Permission class isn't valid")
    self.assertEqual(arn, "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/GET/foo")