@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_api_resource_configs_duplication_warning(self, mock_get_service):
    with pytest.raises(ValueError, match='Values of useLegacySql param are duplicated\\. api_resource_configs contained useLegacySql param in `query` config and useLegacySql was also provided with arg to run_query\\(\\) method\\. Please remove duplicates\\.'):
        self.hook.run_query('query', use_legacy_sql=True, api_resource_configs={'query': {'useLegacySql': False}})
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_api_resource_configs_duplication_warning(self, mock_get_service):
    with pytest.raises(ValueError, match='Values of useLegacySql param are duplicated\\. api_resource_configs contained useLegacySql param in `query` config and useLegacySql was also provided with arg to run_query\\(\\) method\\. Please remove duplicates\\.'):
        self.hook.run_query('query', use_legacy_sql=True, api_resource_configs={'query': {'useLegacySql': False}})