code: def test_bad_recognition_response(
      self, mock_translate_hook, mock_speech_hook
  ):
      mock_speech_hook.return_value.recognize_speech.return_value = (
          RecognizeResponse(results=[SpeechRecognitionResult()])
      )
      op = CloudTranslateSpeechOperator(
          audio={"uri": "gs://bucket/object"},
          config={"encoding": "LINEAR16"},
          target_language="pl",
          format_="text",
          source_language=None,
          model="base",
          gcp_conn_id=GCP_CONN_ID,
          task_id="id",
      )
      with pytest.raises(AirflowException) as ctx:
          op.execute(context=None)
      err = ctx.value
      assert "it should contain 'alternatives' field" in str(err)
  
      mock_speech_hook.assert_called_once_with(
          gcp_conn_id=GCP_CONN_ID,
          impersonation_chain=None,
      )
      mock_translate_hook.assert_called_once_with(
          gcp_conn_id=GCP_CONN_ID,
          impersonation_chain=None,
      )
  
      mock_speech_hook.return_value.recognize_speech.assert_called_once_with(
          audio={"uri": "gs://bucket/object"},
          config={"encoding": "LINEAR16"},
      )
  
      mock_translate_hook.return_value.translate.assert_not_called()
  
file_path: airflow/tests/providers/google/cloud/operators/test_translate_speech.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from google.cloud.speech_v1 import RecognizeResponse, SpeechRecognitionAlternative, SpeechRecognitionResult
  from airflow.exceptions import AirflowException
  from airflow.providers.google.cloud.operators.translate_speech import CloudTranslateSpeechOperator
label_desc: Use image node_id 2 for calling the TestCloudTranslateSpeech obj's underlying member method code with example usage: obj.test_bad_recognition_response(mock_translate_hook, mock_speech_hook) without return types