code: def test_primary_handle(self):
      with mlmd_cm.MLMDConnectionManager.fake() as cm:
          connection_config = cm.primary_mlmd_handle.connection_config
          self.assertEqual(
              connection_config.WhichOneof("config"), "fake_database"
          )
          self.mock_store_factory.assert_called_with(connection_config)
  
      self.mock_store_factory.reset_mock()
  
      with mlmd_cm.MLMDConnectionManager.sqlite("foo") as cm:
          connection_config = cm.primary_mlmd_handle.connection_config
          self.assertEqual(
              connection_config.WhichOneof("config"), "sqlite"
          )
          self.mock_store_factory.assert_called_with(connection_config)
  
file_path: tfx/tfx/orchestration/mlmd_connection_manager_test.py
imports: from unittest import mock
  import tensorflow
  from tfx.orchestration import mlmd_connection_manager
  import ml_metadata
label_desc: Use image node_id 2 for calling the MlmdConnectionManagerTest obj's underlying member method code with example usage: obj.test_primary_handle() without return types