code: def test_optional_feature_debug(self, mock_importlib_import_string):
      with self._caplog.at_level(logging.INFO):
          mock_importlib_import_string.side_effect = (
              AirflowOptionalProviderFeatureException()
          )
          providers_manager = ProvidersManager()
          providers_manager._hook_provider_dict[
              "test_connection"
          ] = HookClassProvider(
              package_name="test_package", hook_class_name="HookClass"
          )
          providers_manager._import_hook(
              hook_class_name=None,
              provider_info=None,
              package_name=None,
              connection_type="test_connection",
          )
          assert [
              "Optional provider feature disabled when importing 'HookClass' from 'test_package' package"
          ] == self._caplog.messages
  
imports: from __future__ import annotations
  import logging
  import re
  import sys
  from unittest.mock import patch
  import pytest
  from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
  from flask_babel import lazy_gettext
  from wtforms import BooleanField, Field, StringField
  from airflow.exceptions import AirflowOptionalProviderFeatureException
  from airflow.providers_manager import HookClassProvider, LazyDictWithCache, PluginInfo, ProviderInfo, ProvidersManager
label_desc: Use image node_id 26 for calling the TestProviderManager obj's underlying member method code with example usage: obj.test_optional_feature_debug(mock_importlib_import_string) without return types