diff --git a/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php b/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php
index f17768ef3b..9a80dbeb3a 100644
--- a/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php
+++ b/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php
@@ -30,12 +30,32 @@
    *   The database connection for the source Drupal database.
    */
   protected function getConnection(array $database) {
+    var_dump('Parent- getConnection');
     // Set up the connection.
-    Database::addConnectionInfo('upgrade', 'default', $database);
-    $connection = Database::getConnection('default', 'upgrade');
+    $this->getDatabaseConnectionInfo($database);
+    $connection = $this->getDatabaseGetConnection();
     return $connection;
   }
 
+  /**
+   * Get Database add connection info.
+   *
+   * @param array $database
+   */
+  protected function getDatabaseConnectionInfo(array $database) {
+    Database::addConnectionInfo('upgrade', 'default', $database);
+  }
+
+  /**
+   * Get database connection.
+   *
+   * @return \Drupal\Core\Database\Connection
+   *   The connection.
+   */
+  protected function getDatabaseGetConnection() {
+    return Database::getConnection('default', 'upgrade');
+  }
+
   /**
    * Gets the system data from the system table of the source Drupal database.
    *
@@ -49,7 +69,7 @@ protected function getSystemData(Connection $connection) {
     $system_data = [];
     try {
       $results = $connection->select('system', 's', [
-        'fetch' => \PDO::FETCH_ASSOC,
+        'fetch' => $this->getPdoFetchAssoc(),
       ])
         ->fields('s')
         ->execute();
@@ -63,6 +83,16 @@ protected function getSystemData(Connection $connection) {
     return $system_data;
   }
 
+  /**
+   * Get PDO fetch associative method.
+   *
+   * @return int
+   *  PDO Fetch method.
+   */
+  protected function getPdoFetchAssoc() {
+    return \PDO::FETCH_ASSOC;
+  }
+
   /**
    * Creates the necessary state entries for SqlBase::getDatabase() to work.
    *
diff --git a/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php
new file mode 100644
index 0000000000..2a7c57625f
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Unit/MigrationConfigurationTraitTest.php
@@ -0,0 +1,78 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal\Unit;
+
+use Drupal\Core\Database\Connection;
+use Drupal\Core\Database\Database;
+use Drupal\Core\Database\Query\Select;
+use Drupal\Core\Database\StatementInterface;
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\migrate_drupal\MigrationConfigurationTrait;
+use Drupal\Tests\UnitTestCase;
+use Drupal\workflows\State;
+
+/**
+ * @coversDefaultClass \Drupal\migrate_drupal\MigrationConfigurationTrait
+ * @group migrate_drupal_rp
+ */
+class MigrationConfigurationTraitTest extends UnitTestCase {
+
+  use MigrationConfigurationTrait;
+
+  /**
+   * @covers ::getConnection
+   */
+  public function testGetConnection() {
+    $this->getDatabaseConnectionInfo([
+      'driver' => 'sqlite',
+      'database' => ':memory:',
+    ]);
+    $this->assertInternalType('array', Database::getConnectionInfo('upgrade'));
+    $this->assertInstanceOf(Connection::class, $this->getDatabaseGetConnection());
+  }
+
+  /**
+   * @covers ::getSystemData
+   */
+  public function testGetSystemData() {
+    $dummy_result = [
+      [
+        "type" => 'good',
+        "name" => 'bob'
+      ],
+      [
+        "type" => 'bad',
+        "name" => 'rob'
+      ],
+    ];
+
+    $data_result['good']['bob'] = $dummy_result[0];
+    $data_result['bad']['rob'] = $dummy_result[1];
+
+    $query_mock = $this->getMockBuilder(Select::class)
+      ->disableOriginalConstructor()
+      ->setMethods(['fields', 'execute'])
+      ->getMock();
+    $query_mock->method('fields')
+      ->willReturnSelf();
+    $query_mock->expects($this->any())
+      ->method('execute')
+      ->willReturn($dummy_result);
+
+    $connection_mock = $this->getMockBuilder(Connection::class)
+      ->disableOriginalConstructor()
+      ->setMethods(['select'])
+      ->getMockForAbstractClass();
+    $connection_mock->expects($this->any())
+      ->method('select')
+      ->willReturn($query_mock);
+
+    $actual = $this->getSystemData($connection_mock);
+    $this->assertArrayEquals($data_result, $actual);
+
+  }
+
+
+
+
+}
\ No newline at end of file
diff --git a/core/modules/migrate_drupal/tests/src/Unit/TestMigrationConfigurationTrait.php b/core/modules/migrate_drupal/tests/src/Unit/TestMigrationConfigurationTrait.php
new file mode 100644
index 0000000000..a160a399c6
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Unit/TestMigrationConfigurationTrait.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal\Unit;
+
+use Drupal\migrate_drupal\MigrationConfigurationTrait;
+use Drupal\Tests\Core\Cache\DatabaseBackendFactoryTest;
+use Drupal\Core\Database\Database;
+
+class TestMigrationConfigurationTrait {
+
+  use MigrationConfigurationTrait {
+    getFollowUpMigrationTags as traitGetFollowUpMigrationTags;
+    getConnection as traitGetConnection;
+    getDatabaseConnectionInfo as traitGetDatabaseConnectionInfo;
+    getDatabaseGetConnection as traitGetDatabaseGetConnection;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFollowUpMigrationTags() {
+    return $this->traitGetFollowUpMigrationTags();
+  }
+
+  public function getConnection(array $database) {
+    var_dump('Child- getConnection');
+    return $this->traitGetConnection($database);
+  }
+
+  /**
+   * Override ::getDatabaseConnectionInfo()
+   * Do NOT call $this->getDrupalPath() inside this function
+   * or you will receive the original error
+   */
+  public function getDatabaseConnectionInfo(array $database) {
+    var_dump('Child- ConnectionInfo');
+    return $this->traitGetDatabaseConnectionInfo($database);
+  }
+
+  public function getDatabaseGetConnection() {
+    var_dump('Child- Connection');
+    return $this->traitGetDatabaseGetConnection();
+  }
+}
\ No newline at end of file
