code: def test_connect_and_disconnect_via_nonssl(self, mock_imaplib):
      mock_conn = _create_fake_imap(mock_imaplib, use_ssl=False)
  
      with ImapHook(imap_conn_id="imap_nonssl"):
          pass
  
      mock_imaplib.IMAP4.assert_called_once_with(
          "imap_server_address", 1143
      )
      mock_conn.login.assert_called_once_with(
          "imap_user", "imap_password"
      )
      assert mock_conn.logout.call_count == 1
  
imports: from __future__ import annotations
  import imaplib
  import json
  from unittest.mock import Mock, mock_open, patch
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.imap.hooks.imap import ImapHook
  from airflow.utils import db
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 8 for calling the TestImapHook obj's underlying member method code with example usage: obj.test_connect_and_disconnect_via_nonssl(mock_imaplib) without return types