diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionUnitTest.php
new file mode 100644
index 0000000..c661e98
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionUnitTest.php
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\system\Tests\Database\ConnectionUnitTest.
+ */
+
+namespace Drupal\system\Tests\Database;
+
+use Drupal\Core\Database\Database;
+use Drupal\simpletest\UnitTestBase;
+
+/**
+ * Tests management of database connections.
+ */
+class ConnectionUnitTest extends UnitTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Connection unit tests',
+      'description' => 'Tests management of database connections.',
+      'group' => 'Database',
+    );
+  }
+
+  /**
+   * Tests Database::closeConnection().
+   */
+  function testClose() {
+    // Retrieve current/original amount of connections.
+    $result = Database::getConnection()->query('SHOW PROCESSLIST')->fetchCol();
+    $original_count = count($result);
+
+    // Verify that retrieving the amount again does not increase it.
+    $result = Database::getConnection()->query('SHOW PROCESSLIST')->fetchCol();
+    $this->assertIdentical(count($result), $original_count);
+
+    // Add a new target to the connection, by cloning the current connection.
+    $connection_info = Database::getConnectionInfo('default');
+    $target = 'DatabaseConnectionUnitTest';
+    Database::addConnectionInfo('default', $target, $connection_info['default']);
+
+    // Verify that the new target exists.
+    $info = Database::getConnectionInfo('default');
+    $this->assertIdentical($info[$target], $connection_info['default']);
+
+    // Open the new connection.
+    Database::getConnection($target, 'default');
+
+    // Verify that there is a new connection.
+    $result = Database::getConnection()->query('SHOW PROCESSLIST')->fetchCol();
+    $this->assertIdentical(count($result), $original_count + 1);
+
+    // Close the connection.
+    Database::closeConnection($target, 'default');
+
+    // Verify that we are back to the original connection count.
+    $result = Database::getConnection()->query('SHOW PROCESSLIST')->fetchCol();
+    $this->assertIdentical(count($result), $original_count);
+  }
+
+}
