async def test_uc_function_to_autogen_tool(dbx_client):
    """
    Testing direct usage of `uc_function_to_autogen_tool` with mocking.
    """
    mock_function_info = generate_function_info()
    with (
        mock.patch(
            "unitycatalog.ai.core.databricks.DatabricksFunctionClient.get_function",
            return_value=mock_function_info,
        ),
        mock.patch(
            "unitycatalog.ai.core.databricks.DatabricksFunctionClient.execute_function",
            return_value=FunctionExecutionResult(format="SCALAR", value="some_string"),
        ),
    ):
        tool = UCFunctionToolkit.uc_function_to_autogen_tool(
            function_name=f"{CATALOG}.{SCHEMA}.test", client=dbx_client
        )
        result_str = await tool.run_json({"x": "some_string"}, CancellationToken())
        result = json.loads(result_str)["value"]
        assert result == "some_string"

    Testing direct usage of `uc_function_to_autogen_tool` with mocking.
    
ai/integrations/autogen/tests/test_autogen_toolkit.py