def test_token_exchange_not_supported(
      self, auth_config_with_auth_code, monkeypatch
  ):
    """Test when token exchange is not supported."""
    monkeypatch.setattr(
        "google.adk.auth.auth_handler.SUPPORT_TOKEN_EXCHANGE", False
    )

    handler = AuthHandler(auth_config_with_auth_code)
    result = handler.exchange_auth_token()

    assert result == auth_config_with_auth_code.exchanged_auth_credential
Test when token exchange is not supported.
tests/unittests/auth/test_auth_handler.py