code: def test_encrypt(self):
      with TemporaryDirectory() as tmp_dir:
          kms_hook = CloudKMSHook()
          content = kms_hook.encrypt(
              key_name=(
                  f"projects/{kms_hook.project_id}/locations/global/keyRings/"
                  f"{GCP_KMS_KEYRING_NAME}/cryptoKeys/{GCP_KMS_KEY_NAME}"
              ),
              plaintext=b"TEST-SECRET",
          )
          with open(
              f"{tmp_dir}/mysecret.txt.encrypted", "wb"
          ) as encrypted_file:
              encrypted_file.write(base64.b64decode(content))
          self.execute_cmd(
              [
                  "gcloud",
                  "kms",
                  "decrypt",
                  "--location",
                  "global",
                  "--keyring",
                  GCP_KMS_KEYRING_NAME,
                  "--key",
                  GCP_KMS_KEY_NAME,
                  "--ciphertext-file",
                  f"{tmp_dir}/mysecret.txt.encrypted",
                  "--plaintext-file",
                  f"{tmp_dir}/mysecret.txt",
              ]
          )
          with open(f"{tmp_dir}/mysecret.txt", "rb") as secret_file:
              secret = secret_file.read()
          assert secret == b"TEST-SECRET"
  
file_path: airflow/tests/providers/google/cloud/hooks/test_kms_system.py
imports: from __future__ import annotations
  import base64
  import os
  from tempfile import TemporaryDirectory
  import pytest
  from airflow.providers.google.cloud.hooks.kms import CloudKMSHook
  from tests.providers.google.cloud.utils.gcp_authenticator import GCP_KMS_KEY
  from tests.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context
label_desc: Use image node_id 1 for calling the TestKmsHookSystem obj's underlying member method code with example usage: obj.test_encrypt() without return types