code: def test_validate_env_id_success(self, env_id, is_valid):
      if is_valid:
          captured_output = StringIO()
          sys.stdout = captured_output
  
          result = _validate_env_id(env_id)
          sys.stdout = sys.__stdout__
  
          assert result == env_id.lower()
          assert result.isalnum()
          if not result == env_id:
              assert LOWERCASE_ENV_ID_MSG in captured_output.getvalue()
      else:
          with pytest.raises(ValueError) as raised_exception:
              _validate_env_id(env_id)
  
              assert INVALID_ENV_ID_MSG in str(raised_exception.value)
  
file_path: airflow/tests/providers/amazon/aws/system/utils/test_helpers.py
imports: from __future__ import annotations
  import os
  import sys
  from io import StringIO
  from unittest.mock import ANY, patch
  import pytest
  from moto import mock_ssm
  from tests.system.providers.amazon.aws import utils
  from tests.system.providers.amazon.aws.utils import DEFAULT_ENV_ID_LEN, DEFAULT_ENV_ID_PREFIX, ENV_ID_ENVIRON_KEY, INVALID_ENV_ID_MSG, LOWERCASE_ENV_ID_MSG, NO_VALUE_MSG, _validate_env_id, set_env_id
label_desc: Use image node_id 3 for calling the TestAmazonSystemTestHelpers obj's underlying member method code with example usage: obj.test_validate_env_id_success(env_id, is_valid) without return types