diff --git a/core/lib/Drupal/Core/EventSubscriber/RouteSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RouteSubscriber.php
new file mode 100644
index 0000000..9944efb
--- /dev/null
+++ b/core/lib/Drupal/Core/EventSubscriber/RouteSubscriber.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\EventSubscriber\RouteSubscriber.
+ */
+
+namespace Drupal\Core\EventSubscriber;
+
+use Drupal\Core\Routing\RouteBuildEvent;
+use Drupal\Core\Routing\RoutingEvents;
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Symfony\Component\Routing\Route;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+/**
+ * Route subscriber adds Routes defined in defineRoutes() to the Route collection
+ * when the RoutingEvents::DYNAMIC event is recieved.
+ */
+class RouteSubscriber implements EventSubscriberInterface {
+
+
+  /**
+   * Define routes to be added to the route collection.
+   *
+   * @return array
+   *   An array of Route objects keyed by route machine name.
+   */
+  protected function defineRoutes() {
+    return array();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getSubscribedEvents() {
+    $events[RoutingEvents::DYNAMIC] = 'routes';
+
+    return $events;
+  }
+
+  /**
+   * Add the routes defined in defineRoutes() to the route collection.
+   */
+  public function routes(RouteBuildEvent $event) {
+    $collection = $event->getRouteCollection();
+    $routes = $this->defineRoutes();
+
+    if (!empty($routes)) {
+      foreach ($routes as $key => $route) {
+        if ($route instanceOf Route && is_string($key)) {
+          $collection->add($key, $route);
+        }
+      }
+    }
+  }
+
+}
diff --git a/core/modules/system/tests/modules/form_test/form_test.services.yml b/core/modules/system/tests/modules/form_test/form_test.services.yml
index e658fca..a3087fe 100644
--- a/core/modules/system/tests/modules/form_test/form_test.services.yml
+++ b/core/modules/system/tests/modules/form_test/form_test.services.yml
@@ -3,6 +3,10 @@ services:
     class: Drupal\form_test\FormTestServiceObject
   form_test.event_subscriber:
     class: Drupal\form_test\EventSubscriber\FormTestEventSubscriber
+    tags:
+      - { name: event_subscriber }
+  form_test.route_subscriber:
+    class: Drupal\form_test\EventSubscriber\FormTestRouteSubscriber
     arguments: ['@module_handler']
     tags:
       - { name: event_subscriber }
diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php
index 11e5a7a..8566267 100644
--- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php
+++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestEventSubscriber.php
@@ -7,10 +7,7 @@
 
 namespace Drupal\form_test\EventSubscriber;
 
-use Drupal\Core\Routing\RouteBuildEvent;
-use Drupal\Core\Routing\RoutingEvents;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Symfony\Component\Routing\Route;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\HttpKernel\KernelEvents;
@@ -21,20 +18,6 @@
 class FormTestEventSubscriber implements EventSubscriberInterface {
 
   /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected $moduleHandler;
-
-  /**
-   * Constructs a FormTestController object.
-   */
-  public function __construct(ModuleHandlerInterface $moduleHandler) {
-    $this->moduleHandler = $moduleHandler;
-  }
-
-  /**
    * Adds custom attributes to the request object.
    *
    * @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
@@ -51,26 +34,8 @@ public function onKernelRequest(GetResponseEvent $event) {
    */
   public static function getSubscribedEvents() {
     $events[KernelEvents::REQUEST][] = array('onKernelRequest');
-    $events[RoutingEvents::DYNAMIC] = 'routes';
 
     return $events;
   }
 
-  /**
-   * Adds routes for the Form Tests.
-   */
-  public function routes(RouteBuildEvent $event) {
-    $collection = $event->getRouteCollection();
-    $defaults = array();
-
-    if ($this->moduleHandler->moduleExists('node')) {
-      $route = new Route(
-        "form-test/two-instances-of-same-form",
-        array('_content' => '\Drupal\form_test\Controller\FormTestController::twoFormInstances'),
-        array('_permission' => 'create page content')
-      );
-      $collection->add("form_test.two_instances", $route);
-    }
-  }
-
 }
diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestRouteSubscriber.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestRouteSubscriber.php
new file mode 100644
index 0000000..f93165e
--- /dev/null
+++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/EventSubscriber/FormTestRouteSubscriber.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\form_test\EventSubscriber\FormTestRouteSubscriber.
+ */
+
+namespace Drupal\form_test\EventSubscriber;
+
+use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\EventSubscriber\RouteSubscriber;
+use Symfony\Component\Routing\Route;
+
+/**
+ * Define Routes for the Form Test module.
+ */
+class FormTestRouteSubscriber extends RouteSubscriber {
+
+  /**
+   * The module handler.
+   *
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface
+   */
+  protected $moduleHandler;
+
+  /**
+   * Constructs a FormTestRouteSubscriber object.
+   */
+  public function __construct(ModuleHandlerInterface $moduleHandler) {
+    $this->moduleHandler = $moduleHandler;
+  }
+
+  /**
+   * Definesroutes for the Form Tests.
+   */
+  protected function defineRoutes() {
+    $routes = array();
+
+    if ($this->moduleHandler->moduleExists('node')) {
+      $routes['form_test.two_instances'] = new Route(
+        "form-test/two-instances-of-same-form",
+        array('_content' => '\Drupal\form_test\Controller\FormTestController::twoFormInstances'),
+        array('_permission' => 'create page content')
+      );
+    }
+
+    return $routes;
+  }
+
+}
