diff --git a/core/tests/Drupal/Tests/Component/Plugin/MockFallbackPluginManager.php b/core/tests/Drupal/Tests/Component/Plugin/MockFallbackPluginManager.php
new file mode 100644
index 0000000..0cb819a
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Plugin/MockFallbackPluginManager.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Plugin\MockFallbackPluginManager.
+ */
+
+namespace Drupal\Tests\Component\Plugin;
+
+use Drupal\Component\Plugin\PluginManagerBase;
+use Drupal\Component\Plugin\FallbackPluginManagerInterface;
+
+/**
+ * Mock FallbackPluginManagerInterface for PluginManagerBaseTest.
+ *
+ * We have to mock FallbackPluginManagerInterface here so that we can implement
+ * ::getFallbackPluginId().
+ */
+class MockFallbackPluginManager extends PluginManagerBase implements FallbackPluginManagerInterface {
+
+  /**
+   * {@inheritdoc}
+   *
+   * Minimally implement getFallbackPluginId so that we can test it.
+   */
+  public function getFallbackPluginId($plugin_id, array $configuration = array()) {
+    return $plugin_id . '_fallback';
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php
new file mode 100644
index 0000000..9c175e4
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Plugin/PluginManagerBaseTest.php
@@ -0,0 +1,102 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Plugin\PluginManagerBaseTest.
+ */
+
+namespace Drupal\Tests\Component\Plugin;
+
+use Drupal\Component\Plugin\PluginManagerBase;
+use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
+use Drupal\Component\Plugin\FallbackPluginManagerInterface;
+use Drupal\Component\Plugin\Exception\PluginNotFoundException;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Component\Plugin\PluginManagerBase
+ * @uses Drupal\Component\Plugin\Exception\PluginNotFoundException
+ * @group Plugin
+ */
+class PluginManagerBaseTest extends UnitTestCase {
+
+  /**
+   * A callback method for mocking FactoryInterface objects.
+   */
+  public function createInstanceCallback() {
+    $args = func_get_args();
+    $plugin_id = $args[0];
+    $configuration = $args[1];
+    if ('invalid' == $plugin_id) {
+      throw new PluginNotFoundException($plugin_id);
+    }
+    return array(
+      'plugin_id' => $plugin_id,
+      'configuration' => $configuration,
+    );
+  }
+
+  /**
+   * Generate a mocked FactoryInterface object with known properties.
+   */
+  public function getMockFactoryInterface($expects_count) {
+    $mock_factory = $this->getMockBuilder('Drupal\Component\Plugin\Factory\FactoryInterface')
+      ->setMethods(array('createInstance'))
+      ->getMockForAbstractClass();
+    $mock_factory->expects($this->exactly($expects_count))
+      ->method('createInstance')
+      ->willReturnCallback(array($this, 'createInstanceCallback'));
+    return $mock_factory;
+  }
+
+  /**
+   * Test createInstance() with no fallback methods.
+   *
+   * @covers ::createInstance
+   */
+  public function testCreateInstance() {
+    $manager = $this->getMockBuilder('Drupal\Component\Plugin\PluginManagerBase')
+      ->getMockForAbstractClass();
+    // PluginManagerBase::createInstance() looks for a factory object and then
+    // calls createInstance() on it. So we have to mock a factory object.
+    $factory_ref = new \ReflectionProperty($manager, 'factory');
+    $factory_ref->setAccessible(TRUE);
+    $factory_ref->setValue($manager, $this->getMockFactoryInterface(1));
+
+    // Finally the test.
+    $configuration_array = array('config' => 'something');
+    $result = $manager->createInstance('valid', $configuration_array);
+    $this->assertEquals('valid', $result['plugin_id']);
+    $this->assertArrayEquals($configuration_array, $result['configuration']);
+  }
+
+  /**
+   * Test createInstance() with a fallback method.
+   *
+   * @covers ::createInstance
+   */
+  public function testCreateInstanceFallback() {
+    // We mock our special mock-class which extends PluginManagerBase and also
+    // implements FallbackPluginManagerInterface.
+    $manager = new MockFallbackPluginManager();
+    // Put our mocked factory on the base object.
+    $factory_ref = new \ReflectionProperty($manager, 'factory');
+    $factory_ref->setAccessible(TRUE);
+
+    // Finally the test.
+    $configuration_array = array('config' => 'something');
+
+    // Test with fallback interface and valid plugin_id.
+    $factory_ref->setValue($manager, $this->getMockFactoryInterface(1));
+    $no_fallback_result = $manager->createInstance('valid', $configuration_array);
+    $this->assertEquals('valid', $no_fallback_result['plugin_id']);
+    $this->assertArrayEquals($configuration_array, $no_fallback_result['configuration']);
+
+    // Test with fallback interface and invalid plugin_id.
+    $factory_ref->setValue($manager, $this->getMockFactoryInterface(2));
+    $fallback_result = $manager->createInstance('invalid', $configuration_array);
+    $this->assertEquals('invalid_fallback', $fallback_result['plugin_id']);
+    $this->assertArrayEquals($configuration_array, $fallback_result['configuration']);
+  }
+
+}
