def METHOD_NAME(self, mock_task):
    # Create a sample project ID and task IDs string
    project_id = 1
    task_ids_str = "1,2"
    task = Task.get(1, self.test_project.id)
    mock_task.return_value = [task]
    timestamp = datetime.datetime(2017, 4, 13)
    # Call the generate_gpx function with some test data
    xml_str = MappingService.generate_gpx(1, task_ids_str, timestamp)
    # Parse the XML string and retrieve the root element
    root = ET.fromstring(xml_str)
    # Test root element
    self.assertEqual(root.tag, "{http://www.topografix.com/GPX/1/1}gpx")
    self.assertEqual(root.attrib["creator"], ORG_NAME)
    self.assertEqual(root.attrib["version"], "1.1")
    # Test metadata element
    metadata = root.find("{http://www.topografix.com/GPX/1/1}metadata")
    self.assertIsNotNone(metadata)
    link = metadata.find("{http://www.topografix.com/GPX/1/1}link")
    self.assertIsNotNone(link)
    self.assertEqual(
        link.attrib["href"], "https://github.com/hotosm/tasking-manager"
    )
    text = link.find("{http://www.topografix.com/GPX/1/1}text")
    self.assertIsNotNone(text)
    self.assertEqual(text.text.strip(), ORG_NAME)
    time = metadata.find("{http://www.topografix.com/GPX/1/1}time")
    self.assertIsNotNone(time)
    self.assertEqual(time.text.strip(), "2017-04-13T00:00:00")
    # Test trk element
    trk = root.find("{http://www.topografix.com/GPX/1/1}trk")
    self.assertIsNotNone(trk)
    name = trk.find("{http://www.topografix.com/GPX/1/1}name")
    self.assertIsNotNone(name)
    self.assertEqual(
        name.text.strip(),
        f"Task for project {project_id}. Do not edit outside of this area!",
    )
    trkseg = trk.find("{http://www.topografix.com/GPX/1/1}trkseg")
    self.assertIsNotNone(trkseg)
    trkpt_list = trkseg.findall("{http://www.topografix.com/GPX/1/1}trkpt")
    self.assertEqual(len(trkpt_list), 5)
    for trkpt in trkpt_list:
        self.assertIn("lat", trkpt.attrib)
        self.assertIn("lon", trkpt.attrib)
    # Test wpt elements
    wpt_list = root.findall("{http://www.topografix.com/GPX/1/1}wpt")
    self.assertEqual(len(wpt_list), 5)
    for wpt in wpt_list:
        self.assertIn("lat", wpt.attrib)
        self.assertIn("lon", wpt.attrib)