def METHOD_NAME(self, mock_component_operation: ComponentOperations) -> None:
    component = CommandComponent(
        name="random_name", version="1", environment="azureml:AzureML-Minimal:1", command="echo hello"
    )
    with patch.object(ComponentOperations, "_resolve_arm_id_or_upload_dependencies") as mock_thing, patch(
        "azure.ai.ml.operations._component_operations.Component._from_rest_object",
        return_value=CommandComponent(),
    ):
        mock_component_operation.create_or_update(component)
        mock_thing.assert_called_once()
    mock_component_operation._version_operation.begin_create_or_update.assert_called_once()