code: def test_should_rotate_variable(self, session):
      fernet_key1 = Fernet.generate_key()
      fernet_key2 = Fernet.generate_key()
      var1_key = f"{__file__}_var1"
      var2_key = f"{__file__}_var2"
  
      # Create unencrypted variable
      with conf_vars({("core", "fernet_key"): ""}), mock.patch(
          "airflow.models.crypto._fernet", None
      ):
          Variable.set(key=var1_key, value="value")
  
      # Create encrypted variable
      with conf_vars(
          {("core", "fernet_key"): fernet_key1.decode()}
      ), mock.patch("airflow.models.crypto._fernet", None):
          Variable.set(key=var2_key, value="value")
  
      # Rotate fernet key
      with conf_vars(
          {
              (
                  "core",
                  "fernet_key",
              ): f"{fernet_key2.decode()},{fernet_key1.decode()}"
          }
      ), mock.patch("airflow.models.crypto._fernet", None):
          args = self.parser.parse_args(["rotate-fernet-key"])
          rotate_fernet_key_command.rotate_fernet_key(args)
  
      # Assert correctness using a new fernet key
      with conf_vars(
          {("core", "fernet_key"): fernet_key2.decode()}
      ), mock.patch("airflow.models.crypto._fernet", None):
          var1 = (
              session.query(Variable)
              .filter(Variable.key == var1_key)
              .first()
          )
          # Unencrypted variable should be unchanged
          assert Variable.get(key=var1_key) == "value"
          assert var1._val == "value"
          assert Variable.get(key=var2_key) == "value"
  
file_path: airflow/tests/cli/commands/test_rotate_fernet_key_command.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from cryptography.fernet import Fernet
  from airflow.cli import cli_parser
  from airflow.cli.commands import rotate_fernet_key_command
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection, Variable
  from airflow.utils.session import provide_session
  from tests.test_utils.config import conf_vars
  from tests.test_utils.db import clear_db_connections, clear_db_variables
label_desc: Use image node_id 4 for calling the TestRotateFernetKeyCommand obj's underlying member method code with example usage: obj.test_should_rotate_variable(session) without return types