def METHOD_NAME(self, resource_group):
    GROUP_NAME = resource_group.name
    resource_name = self.get_resource_name("test-resource-list-by-rg")
    resource = CommunicationServiceResource(
        location=COMMUNICATION_SERVICE_LOCATION,
        data_location = COMMUNICATION_SERVICE_DATA_LOCATION
    )
    resource = self.communication_client.communication_service.begin_create_or_update(
        GROUP_NAME,
        resource_name,
        resource
    ).result()
    self.assertEqual(resource.name, resource_name)
    self.assertEqual(resource.provisioning_state, "Succeeded")
    self.assertIsNotNone(resource.immutable_resource_id)
    self.assertEqual(resource.location, COMMUNICATION_SERVICE_LOCATION)
    self.assertEqual(resource.data_location, COMMUNICATION_SERVICE_DATA_LOCATION)
    self.assertIsNone(resource.notification_hub_id)
    self.assertIsNone(resource.tags)
    resources = self.communication_client.communication_service.list_by_resource_group(GROUP_NAME)
    self.assertIsNotNone(resources)
    # Verify that the resource we just created is in the list
    resource_found = False
    for resource in resources:
        if resource.name == resource_name:
            resource_found = True
    self.assertTrue(resource_found)