code: def test_add_managed_identity_connection_widgets():
      class FakeHook:
          @classmethod
          @add_managed_identity_connection_widgets
          def test_class_method(cls) -> dict[str, Any]:
              return {"foo": "bar"}
  
      widgets = FakeHook.test_class_method()
  
      assert "managed_identity_client_id" in widgets
      assert "workload_identity_tenant_id" in widgets
      assert widgets["foo"] == "bar"
  
file_path: airflow/tests/providers/microsoft/azure/test_utils.py
imports: from __future__ import annotations
  from typing import Any
  from unittest import mock
  import pytest
  from airflow.providers.microsoft.azure.utils import AzureIdentityCredentialAdapter, add_managed_identity_connection_widgets, get_async_default_azure_credential, get_field, get_sync_default_azure_credential
label_desc: Use image node_id 3 for calling a global function with example usage: test_add_managed_identity_connection_widgets() and returns: dict