docstr: Tests rotating encrypted extras.
code: def test_connection_extra_with_encryption_rotate_fernet_key(self):
      """
      Tests rotating encrypted extras.
      """
      key1 = Fernet.generate_key()
      key2 = Fernet.generate_key()
  
      with conf_vars({("core", "fernet_key"): key1.decode()}):
          test_connection = Connection(extra="testextra")
          assert test_connection.is_extra_encrypted
          assert test_connection.extra == "testextra"
          assert (
              Fernet(key1).decrypt(test_connection._extra.encode())
              == b"testextra"
          )
  
      # Test decrypt of old value with new key
      with conf_vars(
          {("core", "fernet_key"): f"{key2.decode()},{key1.decode()}"}
      ):
          crypto._fernet = None
          assert test_connection.extra == "testextra"
  
          # Test decrypt of new value with new key
          test_connection.rotate_fernet_key()
          assert test_connection.is_extra_encrypted
          assert test_connection.extra == "testextra"
          assert (
              Fernet(key2).decrypt(test_connection._extra.encode())
              == b"testextra"
          )
  
imports: from __future__ import annotations
  import json
  import os
  import re
  from collections import namedtuple
  from unittest import mock
  import pytest
  import sqlalchemy
  from cryptography.fernet import Fernet
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection, crypto
  from airflow.providers.sqlite.hooks.sqlite import SqliteHook
  from airflow.providers_manager import HookInfo
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 5 for calling the TestConnection obj's underlying member method code with example usage: obj.test_connection_extra_with_encryption_rotate_fernet_key() without return types