def METHOD_NAME(self, resource_group):
    SUBSCRIPTION_ID = self.get_settings_value("SUBSCRIPTION_ID")
    RESOURCE_GROUP_NAME = resource_group.name
    RESOURCE_NAME = self.get_resource_name("digitalTwin")
    # Setup Digital Twin
    msi_id = self.create_digital_twins_and_validate(resource_group_name = RESOURCE_GROUP_NAME, resource_name = RESOURCE_NAME)
    # Create endpoint
    ENDPOINT_NAME = self.get_resource_name("endpoint")
    ENDPOINT_BODY = { 
        "properties": {
            "endpointType": "ServiceBus",
            "authenticationType": "IdentityBased",
            "endpointUri": "sb://mysb.servicebus.windows.net/",
            "entityPath": "abcabc",
            "identity": {
                "type": "UserAssigned",
                "userAssignedIdentity": msi_id
            }
        }
    }
    result = self.client.digital_twins_endpoint.begin_create_or_update(resource_group_name = RESOURCE_GROUP_NAME, resource_name = RESOURCE_NAME, endpoint_name = ENDPOINT_NAME, endpoint_description = ENDPOINT_BODY)
    result = result.result()
    assert result.name == ENDPOINT_NAME
    assert result.properties.identity is not None
    # Cleanup
    self.client.digital_twins_endpoint.begin_delete(resource_group_name = RESOURCE_GROUP_NAME, resource_name = RESOURCE_NAME, endpoint_name = ENDPOINT_NAME).result()
    self.client.digital_twins.begin_delete(resource_group_name = RESOURCE_GROUP_NAME, resource_name = RESOURCE_NAME).result()