def converter_with_patched_build(monkeypatch, mock_api_resource):
  """Fixture that provides a converter with the build function patched.

  This simulates a successful API spec fetch.
  """
  # Create a mock for the build function
  mock_build = MagicMock(return_value=mock_api_resource)

  # Patch the build function in the target module
  monkeypatch.setattr(
      "google.adk.tools.google_api_tool.googleapi_to_openapi_converter.build",
      mock_build,
  )

  # Create and return a converter instance
  return GoogleApiToOpenApiConverter("calendar", "v3")
Fixture that provides a converter with the build function patched.

  This simulates a successful API spec fetch.
  
tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py