docstr: Test that we can resolve cluster id by cluster name.
docstr_tok: ["Test","that","we","can","resolve","cluster","id","by","cluster","name","."]
code: def test_get_cluster_id_by_name(self):
      """
      Test that we can resolve cluster id by cluster name.
      """
      hook = EmrHook(
          aws_conn_id="aws_default", emr_conn_id="emr_default"
      )
  
      job_flow = hook.create_job_flow(
          {
              "Name": "test_cluster",
              "Instances": {"KeepJobFlowAliveWhenNoSteps": True},
          }
      )
  
      job_flow_id = job_flow["JobFlowId"]
  
      matching_cluster = hook.get_cluster_id_by_name(
          "test_cluster", ["RUNNING", "WAITING"]
      )
  
      assert matching_cluster == job_flow_id
  
      no_match = hook.get_cluster_id_by_name(
          "foo", ["RUNNING", "WAITING", "BOOTSTRAPPING"]
      )
  
      assert no_match is None
  
imports: from __future__ import annotations
  import re
  from unittest import mock
  import boto3
  import pytest
  from botocore.exceptions import WaiterError
  from moto import mock_emr
  from airflow.exceptions import AirflowException
  from airflow.providers.amazon.aws.hooks.emr import EmrHook
label_desc: Use image node_id 12 for calling the TestEmrHook obj's underlying member method code with example usage: obj.test_get_cluster_id_by_name() without return types