diff --git a/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
index 18d9ae8..9beedf2 100644
--- a/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
+++ b/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
@@ -56,7 +56,7 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
    *   (optional) The name of the annotation that contains the plugin definition.
    *   Defaults to 'Drupal\Component\Annotation\Plugin'.
    */
-  function __construct($plugin_namespaces = array(), $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') {
+  public function __construct($plugin_namespaces = array(), $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') {
     $this->pluginNamespaces = $plugin_namespaces;
     $this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
   }
diff --git a/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php b/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php
new file mode 100644
index 0000000..27e4701
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Annotation\AnnotatedClassDiscoveryTest.
+ */
+
+namespace Drupal\Tests\Component\Annotation;
+
+use Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery
+ * @group Annotation
+ */
+class AnnotatedClassDiscoveryTest extends UnitTestCase {
+
+  /**
+   * @covers ::__construct
+   * @covers ::getPluginNamespaces
+   */
+  public function testGetPluginNamespaces() {
+    $discovery = new AnnotatedClassDiscovery(['com/example' => [__DIR__]]);
+
+    $reflection = new \ReflectionMethod($discovery, 'getPluginNamespaces');
+    $reflection->setAccessible(TRUE);
+
+    $result = $reflection->invoke(
+      $discovery);
+    $this->assertEquals([
+      'com/example' => [__DIR__]
+    ], $result);
+  }
+
+  /**
+   * @covers ::getDefinitions
+   * @covers ::prepareAnnotationDefinition
+   * @covers ::getAnnotationReader
+   */
+  public function testGetDefinitions() {
+    $discovery = new AnnotatedClassDiscovery(['com/example' => [__DIR__ . '/Fixtures']]);
+    $this->assertEquals([
+      'discovery_test_1' => [
+        'id' => 'discovery_test_1',
+        'class' => 'com/example\com\example\DiscoveryTest1',
+      ],
+    ], $discovery->getDefinitions());
+  }
+}
diff --git a/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php b/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php
new file mode 100644
index 0000000..e412cd0
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/AnnotationBaseTest.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Annotation\AnnotationBaseTest.
+ */
+
+namespace Drupal\Tests\Component\Annotation;
+
+use Drupal\Component\Annotation\AnnotationBase;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Component\Annotation\AnnotationBase
+ * @group Annotation
+ */
+class AnnotationBaseTest extends UnitTestCase {
+
+  /**
+   * @covers ::getProvider
+   * @covers ::setProvider
+   */
+  public function testSetProvider() {
+    $plugin = new AnnotationBaseStub();
+    $plugin->setProvider('example');
+    $this->assertEquals('example', $plugin->getProvider());
+  }
+
+  /**
+   * @covers ::getId
+   */
+  public function testGetId() {
+    $plugin = new AnnotationBaseStub();
+    $plugin->id = 'example'; // Doctrine sets the public prop directly.
+    $this->assertEquals('example', $plugin->getId());
+  }
+
+  /**
+   * @covers ::getClass
+   * @covers ::setClass
+   */
+  public function testSetClass() {
+    $plugin = new AnnotationBaseStub();
+    $plugin->setClass('example');
+    $this->assertEquals('example', $plugin->getClass());
+  }
+}
+
+class AnnotationBaseStub extends AnnotationBase {
+  public function get() {
+  }
+}
diff --git a/core/tests/Drupal/Tests/Component/Annotation/Fixtures/com/example/DiscoveryTest1.php b/core/tests/Drupal/Tests/Component/Annotation/Fixtures/com/example/DiscoveryTest1.php
new file mode 100644
index 0000000..5aa18c4
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/Fixtures/com/example/DiscoveryTest1.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Contains \com\example\DiscoveryTest.
+ */
+
+namespace com\example;
+
+/**
+ * @Plugin(
+ *   id = "discovery_test_1"
+ * )
+ */
+class DiscoveryTest1 {}
diff --git a/core/tests/Drupal/Tests/Component/Annotation/Fixtures/com/example/discoverytest2.yml b/core/tests/Drupal/Tests/Component/Annotation/Fixtures/com/example/discoverytest2.yml
new file mode 100644
index 0000000..cd38150
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/Fixtures/com/example/discoverytest2.yml
@@ -0,0 +1,2 @@
+# This should not be loaded by our annotated class discovery.
+id:discovery_test_2
diff --git a/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php b/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
new file mode 100644
index 0000000..551da2d
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Annotation\MockFileFinderTest.
+ */
+
+namespace Drupal\Tests\Component\Annotation;
+
+use Drupal\Component\Annotation\Reflection\MockFileFinder;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Component\Annotation\Reflection\MockFileFinder
+ * @group Annotation
+ */
+class MockFileFinderTest extends UnitTestCase {
+
+  /**
+   * @covers ::__construct
+   * @covers ::create
+   * @covers ::findFile
+   */
+  public function testFindFile() {
+    $tmp = MockFileFinder::create('testfilename.txt');
+    $this->assertEquals('testfilename.txt', $tmp->findFile('n/a'));
+    $this->assertEquals('testfilename.txt', $tmp->findFile('someclass'));
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php b/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php
new file mode 100644
index 0000000..acc5b57
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/PluginIdTest.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Annotation\PluginIdTest.
+ */
+
+namespace Drupal\Tests\Component\Annotation;
+
+use Drupal\Component\Annotation\PluginID;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Component\Annotation\PluginId
+ * @group Annotation
+ */
+class PluginIdTest extends UnitTestCase {
+
+  /**
+   * @covers ::get
+   */
+  public function testGet() {
+    // Assert plugin starts empty regardless on constructor.
+    $plugin = new PluginId([
+      'foo' => 'bar',
+      'biz' => [
+        'baz' => 'boom',
+      ],
+      'nestedAnnotation' => new PluginId([
+        'foo' => 'bar',
+      ]),
+      'value' => 'biz'
+    ]);
+    $this->assertEquals([
+      'id' => NULL,
+      'class' => NULL,
+      'provider' => NULL,
+    ], $plugin->get());
+
+    // Set values and ensure we can retrieve them.
+    $plugin->value = 'foo';
+    $plugin->setClass('bar');
+    $plugin->setProvider('baz');
+    $this->assertEquals([
+      'id' => 'foo',
+      'class' => 'bar',
+      'provider' => 'baz',
+    ], $plugin->get());
+  }
+
+  /**
+   * @covers ::getId
+   */
+  public function testGetId() {
+    $plugin = new PluginId([]);
+    $plugin->value = 'example';
+    $this->assertEquals('example', $plugin->getId());
+  }
+}
diff --git a/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php b/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php
new file mode 100644
index 0000000..d4b6f3f
--- /dev/null
+++ b/core/tests/Drupal/Tests/Component/Annotation/PluginTest.php
@@ -0,0 +1,102 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\Component\Annotation\PluginTest.
+ */
+
+namespace Drupal\Tests\Component\Annotation;
+
+use Drupal\Component\Annotation\Plugin;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\Component\Annotation\Plugin
+ * @group Annotation
+ */
+class PluginTest extends UnitTestCase {
+
+  /**
+   * @covers ::__construct
+   * @covers ::parse
+   * @covers ::get
+   */
+  public function testGet() {
+    // Assert all values are accepted through constructor and default value is
+    // used for non existent but defined property.
+    $plugin = new PluginStub([
+      'foo' => 'bar',
+      'biz' => [
+        'baz' => 'boom',
+      ],
+      'nestedAnnotation' => new Plugin([
+        'foo' => 'bar',
+      ]),
+    ]);
+    $this->assertEquals([
+      // This property wasn't in our definition but is defined as a property on
+      // our plugin class.
+      'defaultProperty' => 'testvalue',
+      'foo' => 'bar',
+      'biz' => [
+        'baz' => 'boom',
+      ],
+      'nestedAnnotation' => [
+        'foo' => 'bar',
+      ],
+    ], $plugin->get());
+
+    // Without default properties, we get a completely empty plugin definition.
+    $plugin = new Plugin([]);
+    $this->assertEquals([], $plugin->get());
+  }
+
+  /**
+   * @covers ::getProvider
+   */
+  public function testGetProvider() {
+    $plugin = new Plugin(['provider' => 'example']);
+    $this->assertEquals('example', $plugin->getProvider());
+  }
+
+  /**
+   * @covers ::setProvider
+   */
+  public function testSetProvider() {
+    $plugin = new Plugin([]);
+    $plugin->setProvider('example');
+    $this->assertEquals('example', $plugin->getProvider());
+  }
+
+  /**
+   * @covers ::getId
+   */
+  public function testGetId() {
+    $plugin = new Plugin(['id' => 'example']);
+    $this->assertEquals('example', $plugin->getId());
+  }
+
+
+  /**
+   * @covers ::getClass
+   */
+  public function testGetClass() {
+    $plugin = new Plugin(['class' => 'example']);
+    $this->assertEquals('example', $plugin->getClass());
+  }
+
+  /**
+   * @covers ::setClass
+   */
+  public function testSetClass() {
+    $plugin = new Plugin([]);
+    $plugin->setClass('example');
+    $this->assertEquals('example', $plugin->getClass());
+  }
+
+}
+
+
+class PluginStub extends Plugin {
+  protected $defaultProperty = 'testvalue';
+}
