docstr: Test poll_for_termination works as expected with COMPLETED application.
docstr_tok: ["Test","poll_for_termination","works","as","expected","with","COMPLETED","application","."]
code: def test_poll_for_termination(self, mock_hook):
      """Test poll_for_termination works as expected with COMPLETED application."""
      # Given
      mock_hook.get_spark_state.return_value = "COMPLETED"
  
      # When
      self.operator.poll_for_termination(MOCK_APP_ID)
  
file_path: airflow/tests/providers/alibaba/cloud/operators/test_analyticdb_spark.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.providers.alibaba.cloud.operators.analyticdb_spark import AnalyticDBSparkBaseOperator, AnalyticDBSparkBatchOperator, AnalyticDBSparkSQLOperator
label_desc: Use image node_id 3 for calling the TestAnalyticDBSparkBaseOperator obj's underlying member method code with example usage: obj.test_poll_for_termination(mock_hook) without return types