diff --git a/core/lib/Drupal/Component/Plugin/Context/Context.php b/core/lib/Drupal/Component/Plugin/Context/Context.php
index c891e62..0ea4a49 100644
--- a/core/lib/Drupal/Component/Plugin/Context/Context.php
+++ b/core/lib/Drupal/Component/Plugin/Context/Context.php
@@ -31,20 +31,16 @@ class Context implements ContextInterface {
   protected $contextDefinition;
 
   /**
-   * Sets the contextDefinition for us without needing to call the setter.
+   * Create a context object.
    *
    * @param \Drupal\Component\Plugin\Context\ContextDefinitionInterface $context_definition
    *   The context definition.
+   * @param mixed $context_value|NULL
+   *   The value of the context.
    */
-  public function __construct(ContextDefinitionInterface $context_definition) {
+  public function __construct(ContextDefinitionInterface $context_definition, $context_value = NULL) {
     $this->contextDefinition = $context_definition;
-  }
-
-  /**
-   * Implements \Drupal\Component\Plugin\Context\ContextInterface::setContextValue().
-   */
-  public function setContextValue($value) {
-    $this->contextValue = $value;
+    $this->contextValue = $context_value;
   }
 
   /**
@@ -75,13 +71,6 @@ public function hasContextValue() {
   }
 
   /**
-   * {@inheritdoc}
-   */
-  public function setContextDefinition(ContextDefinitionInterface $context_definition) {
-    $this->contextDefinition = $context_definition;
-  }
-
-  /**
    * Implements \Drupal\Component\Plugin\Context\ContextInterface::getContextDefinition().
    */
   public function getContextDefinition() {
@@ -92,10 +81,10 @@ public function getContextDefinition() {
    * Implements \Drupal\Component\Plugin\Context\ContextInterface::getConstraints().
    */
   public function getConstraints() {
-    if (empty($this->contextDefinition['class'])) {
+    if ($this->contextDefinition->getDataType() != 'class') {
       throw new ContextException("An error was encountered while trying to validate the context.");
     }
-    return array(new Type($this->contextDefinition['class']));
+    return array(new Type($this->contextDefinition->getDefaultValue()));
   }
 
   /**
diff --git a/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php b/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php
index 04948f9..2cfbc6d 100644
--- a/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php
+++ b/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php
@@ -13,16 +13,6 @@
 interface ContextInterface {
 
   /**
-   * Sets the context value.
-   *
-   * @param mixed $value
-   *   The value of this context, matching the context definition.
-   *
-   * @see \Drupal\Component\Plugin\Context\ContextInterface::setContextDefinition().
-   */
-  public function setContextValue($value);
-
-  /**
    * Gets the context value.
    *
    * @return mixed
@@ -39,15 +29,6 @@ public function getContextValue();
   public function hasContextValue();
 
   /**
-   * Sets the definition that the context must conform to.
-   *
-   * @param \Drupal\Component\Plugin\Context\ContextDefinitionInterface $context_definition
-   *   A defining characteristic representation of the context against which
-   *   that context can be validated.
-   */
-  public function setContextDefinition(ContextDefinitionInterface $context_definition);
-
-  /**
    * Gets the provided definition that the context must conform to.
    *
    * @return \Drupal\Component\Plugin\Context\ContextDefinitionInterface
diff --git a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
index d9c9c8a..fe7b59d 100644
--- a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
+++ b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
@@ -49,8 +49,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     foreach ($context as $key => $value) {
       $context_definition = $this->getContextDefinition($key);
-      $this->context[$key] = new Context($context_definition);
-      $this->context[$key]->setContextValue($value);
+      $this->context[$key] = new Context($context_definition, $value);
     }
   }
 
@@ -124,7 +123,8 @@ public function getContextValue($name) {
    * {@inheritdoc}
    */
   public function setContextValue($name, $value) {
-    $this->getContext($name)->setContextValue($value);
+    $context = $this->getContext($name);
+    $this->context[$name] = new Context($context->getContextDefinition(), $value);
     return $this;
   }
 
diff --git a/core/lib/Drupal/Core/Plugin/Context/Context.php b/core/lib/Drupal/Core/Plugin/Context/Context.php
index 5a5ab6c..4d46dc4 100644
--- a/core/lib/Drupal/Core/Plugin/Context/Context.php
+++ b/core/lib/Drupal/Core/Plugin/Context/Context.php
@@ -44,10 +44,16 @@ class Context extends ComponentContext implements ContextInterface {
   protected $cacheabilityMetadata;
 
   /**
-   * {@inheritdoc}
-   */
-  public function __construct(ContextDefinitionInterface $context_definition) {
-    parent::__construct($context_definition);
+   * Create a context object.
+   *
+   * @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition
+   *   The context definition.
+   * @param \Drupal\Core\TypedData\TypedDataInterface $context_value
+   *   The Typed Data context value object.
+   */
+  public function __construct(ContextDefinitionInterface $context_definition, TypedDataInterface $context_value = NULL) {
+    parent::__construct($context_definition, is_object($context_value) ? $context_value->getValue() : $context_value);
+    $this->contextData = $context_value;
     $this->cacheabilityMetadata = new CacheableMetadata();
   }
 
@@ -81,9 +87,14 @@ public function hasContextValue() {
   }
 
   /**
-   * {@inheritdoc}
+   * Sets the context value.
+   *
+   * @param mixed $value
+   *   The value of this context, matching the context definition.
+   *
+   * @return $this
    */
-  public function setContextValue($value) {
+  protected function setContextValue($value) {
     // Add the value as a cacheable dependency only if implements the interface
     // to prevent it from disabling caching with a max-age 0.
     if ($value instanceof CacheableDependencyInterface) {
@@ -98,6 +109,19 @@ public function setContextValue($value) {
   }
 
   /**
+   * Sets the context value as typed data object.
+   *
+   * @param \Drupal\Core\TypedData\TypedDataInterface $data
+   *   The context value as a typed data object.
+   *
+   * @return $this
+   */
+  protected function setContextData(TypedDataInterface $data) {
+    $this->contextData = $data;
+    return $this;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function getConstraints() {
@@ -120,13 +144,6 @@ public function getContextData() {
     return $this->contextData;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function setContextData(TypedDataInterface $data) {
-    $this->contextData = $data;
-    return $this;
-  }
 
   /**
    * {@inheritdoc}
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php b/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
index 39c2460..f43eafd 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
@@ -73,6 +73,7 @@ public function getMatchingContexts(array $contexts, ContextDefinitionInterface
    * {@inheritdoc}
    */
   public function applyContextMapping(ContextAwarePluginInterface $plugin, $contexts, $mappings = array()) {
+    /** @var $contexts \Drupal\Core\Plugin\Context\ContextInterface[] */
     $mappings += $plugin->getContextMapping();
     // Loop through each of the expected contexts.
 
@@ -95,7 +96,7 @@ public function applyContextMapping(ContextAwarePluginInterface $plugin, $contex
 
         // Pass the value to the plugin if there is one.
         if ($contexts[$context_id]->hasContextValue()) {
-          $plugin->setContextValue($plugin_context_id, $contexts[$context_id]->getContextValue());
+          $plugin->setContextValue($plugin_context_id, $contexts[$context_id]->getContextData());
         }
         elseif ($plugin_context_definition->isRequired()) {
           // Collect required contexts that exist but are missing a value.
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php
index 2f1b785..14dd889 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextHandlerInterface.php
@@ -68,7 +68,7 @@ public function getMatchingContexts(array $contexts, ContextDefinitionInterface
    *
    * @param \Drupal\Core\Plugin\ContextAwarePluginInterface $plugin
    *   A plugin about to be evaluated.
-   * @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts
+   * @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
    *   An array of contexts to set on the plugin. They will only be set if they
    *   match the plugin's context definitions.
    * @param array $mappings
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
index 5b1e6bd..c507c89 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
@@ -17,21 +17,19 @@
 interface ContextInterface extends ComponentContextInterface, CacheableDependencyInterface {
 
   /**
-   * Gets the context value as typed data object.
+   * Gets the provided definition that the context must conform to.
    *
-   * @return \Drupal\Core\TypedData\TypedDataInterface
+   * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
+   *   The defining characteristic representation of the context.
    */
-  public function getContextData();
+  public function getContextDefinition();
 
   /**
-   * Sets the context value as typed data object.
-   *
-   * @param \Drupal\Core\TypedData\TypedDataInterface $data
-   *   The context value as a typed data object.
+   * Gets the context value as typed data object.
    *
-   * @return $this
+   * @return \Drupal\Core\TypedData\TypedDataInterface
    */
-  public function setContextData(TypedDataInterface $data);
+  public function getContextData();
 
   /**
    * Adds a dependency on an object: merges its cacheability metadata.
diff --git a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
index 51a39d7..444a5dc 100644
--- a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
+++ b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
@@ -15,6 +15,7 @@
 use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
+use Drupal\Core\TypedData\TypedDataInterface;
 use Drupal\Core\TypedData\TypedDataTrait;
 use Drupal\Component\Plugin\Context\ContextInterface as ComponentContextInterface;
 use Drupal\Core\Plugin\Context\ContextInterface;
@@ -30,6 +31,9 @@
   /**
    * {@inheritdoc}
    *
+   * @return \Drupal\Core\Plugin\Context\ContextInterface
+   *   The context object.
+   *
    * This code is identical to the Component in order to pick up a different
    * Context class.
    */
@@ -55,6 +59,19 @@ public function setContext($name, ComponentContextInterface $context) {
   /**
    * {@inheritdoc}
    */
+  public function setContextValue($name, $value) {
+    if (!$value instanceof TypedDataInterface) {
+      throw new ContextException("Context value must implement TypedDataInterface.");
+    }
+    $context = $this->getContext($name);
+    $this->context[$name] = new Context($context->getContextDefinition(), $value);
+    $this->context[$name]->addCacheableDependency($context);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getContextMapping() {
     $configuration = $this instanceof ConfigurablePluginInterface ? $this->getConfiguration() : $this->configuration;
     return isset($configuration['context_mapping']) ? $configuration['context_mapping'] : [];
@@ -85,6 +102,16 @@ public function getContextDefinitions() {
   }
 
   /**
+   * {@inheritdoc}
+   *
+   * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
+   */
+  public function getContextDefinition($name) {
+    return parent::getContextDefinition($name);
+  }
+
+
+  /**
    * Wraps the context handler.
    *
    * @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
diff --git a/core/modules/block/src/EventSubscriber/CurrentLanguageContext.php b/core/modules/block/src/EventSubscriber/CurrentLanguageContext.php
index 7b1a206..6388b97 100644
--- a/core/modules/block/src/EventSubscriber/CurrentLanguageContext.php
+++ b/core/modules/block/src/EventSubscriber/CurrentLanguageContext.php
@@ -13,6 +13,8 @@
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\Plugin\Context\ContextDefinition;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
+use Drupal\Core\TypedData\DataDefinition;
+use Drupal\Core\TypedData\Plugin\DataType\Language;
 
 /**
  * Sets the current language as a context.
@@ -47,8 +49,9 @@ public function onBlockActiveContext(BlockContextEvent $event) {
     $info = $this->languageManager->getDefinedLanguageTypesInfo();
     foreach ($language_types as $type_key) {
       if (isset($info[$type_key]['name'])) {
-        $context = new Context(new ContextDefinition('language', $info[$type_key]['name']));
-        $context->setContextValue($this->languageManager->getCurrentLanguage($type_key));
+        $context_value = Language::createInstance(DataDefinition::createFromDataType('language'));
+        $context_value->setValue($this->languageManager->getCurrentLanguage($type_key));
+        $context = new Context(new ContextDefinition('language', $info[$type_key]['name']), $context_value);
 
         $cacheability = new CacheableMetadata();
         $cacheability->setCacheContexts(['languages:' . $type_key]);
diff --git a/core/modules/block/src/EventSubscriber/CurrentUserContext.php b/core/modules/block/src/EventSubscriber/CurrentUserContext.php
index 194a252..3d94bc2 100644
--- a/core/modules/block/src/EventSubscriber/CurrentUserContext.php
+++ b/core/modules/block/src/EventSubscriber/CurrentUserContext.php
@@ -10,6 +10,7 @@
 use Drupal\block\Event\BlockContextEvent;
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\Plugin\Context\ContextDefinition;
 use Drupal\Core\Session\AccountInterface;
@@ -55,8 +56,7 @@ public function __construct(AccountInterface $account, EntityManagerInterface $e
   public function onBlockActiveContext(BlockContextEvent $event) {
     $current_user = $this->userStorage->load($this->account->id());
 
-    $context = new Context(new ContextDefinition('entity:user', $this->t('Current user')));
-    $context->setContextValue($current_user);
+    $context = new Context(new ContextDefinition('entity:user', $this->t('Current user')), EntityAdapter::createFromEntity($current_user));
     $cacheability = new CacheableMetadata();
     $cacheability->setCacheContexts(['user']);
     $context->addCacheableDependency($cacheability);
diff --git a/core/modules/block/src/EventSubscriber/NodeRouteContext.php b/core/modules/block/src/EventSubscriber/NodeRouteContext.php
deleted file mode 100644
index 89d24f5..0000000
--- a/core/modules/block/src/EventSubscriber/NodeRouteContext.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\block\EventSubscriber\NodeRouteContext.
- */
-
-namespace Drupal\block\EventSubscriber;
-
-use Drupal\block\Event\BlockContextEvent;
-use Drupal\Core\Cache\CacheableMetadata;
-use Drupal\Core\Plugin\Context\Context;
-use Drupal\Core\Plugin\Context\ContextDefinition;
-use Drupal\Core\Routing\RouteMatchInterface;
-use Drupal\node\Entity\Node;
-
-/**
- * Sets the current node as a context on node routes.
- */
-class NodeRouteContext extends BlockContextSubscriberBase {
-
-  /**
-   * The route match object.
-   *
-   * @var \Drupal\Core\Routing\RouteMatchInterface
-   */
-  protected $routeMatch;
-
-  /**
-   * Constructs a new NodeRouteContext.
-   *
-   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
-   *   The route match object.
-   */
-  public function __construct(RouteMatchInterface $route_match) {
-    $this->routeMatch = $route_match;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function onBlockActiveContext(BlockContextEvent $event) {
-    $context = new Context(new ContextDefinition('entity:node', NULL, FALSE));
-    if (($route_object = $this->routeMatch->getRouteObject()) && ($route_contexts = $route_object->getOption('parameters')) && isset($route_contexts['node'])) {
-      if ($node = $this->routeMatch->getParameter('node')) {
-        $context->setContextValue($node);
-      }
-      $event->setContext('node.node', $context);
-    }
-    elseif ($this->routeMatch->getRouteName() == 'node.add') {
-      $node_type = $this->routeMatch->getParameter('node_type');
-      $context->setContextValue(Node::create(array('type' => $node_type->id())));
-    }
-    $cacheability = new CacheableMetadata();
-    $cacheability->setCacheContexts(['route']);
-    $context->addCacheableDependency($cacheability);
-    $event->setContext('node.node', $context);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function onBlockAdministrativeContext(BlockContextEvent $event) {
-    $context = new Context(new ContextDefinition('entity:node'));
-    $event->setContext('node.node', $context);
-  }
-
-}
diff --git a/core/modules/language/src/Tests/Condition/LanguageConditionTest.php b/core/modules/language/src/Tests/Condition/LanguageConditionTest.php
index 9cd3cf9..f0cdd20 100644
--- a/core/modules/language/src/Tests/Condition/LanguageConditionTest.php
+++ b/core/modules/language/src/Tests/Condition/LanguageConditionTest.php
@@ -7,6 +7,8 @@
 
 namespace Drupal\language\Tests\Condition;
 
+use Drupal\Core\TypedData\DataDefinition;
+use Drupal\Core\TypedData\Plugin\DataType\Language;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\simpletest\KernelTestBase;
 use Drupal\Core\Condition\ConditionManager;
@@ -56,7 +58,8 @@ protected function setUp() {
   public function testConditions() {
     // Grab the language condition and configure it to check the content
     // language.
-    $language = \Drupal::languageManager()->getLanguage('en');
+    $language = Language::createInstance(DataDefinition::createFromDataType('language'));
+    $language->setValue(\Drupal::languageManager()->getLanguage('en'));
     $condition = $this->manager->createInstance('language')
       ->setConfig('langcodes', array('en' => 'en', 'it' => 'it'))
       ->setContextValue('language', $language);
@@ -77,7 +80,7 @@ public function testConditions() {
     $this->assertEqual($condition->summary(), 'The language is not Italian.');
 
     // Change the default language to Italian.
-    $language = \Drupal::languageManager()->getLanguage('it');
+    $language->setValue(\Drupal::languageManager()->getLanguage('it'));
 
     $condition = $this->manager->createInstance('language')
       ->setConfig('langcodes', array('en' => 'en', 'it' => 'it'))
diff --git a/core/modules/node/src/Tests/Condition/NodeConditionTest.php b/core/modules/node/src/Tests/Condition/NodeConditionTest.php
index d739751..e1a276c 100644
--- a/core/modules/node/src/Tests/Condition/NodeConditionTest.php
+++ b/core/modules/node/src/Tests/Condition/NodeConditionTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\node\Tests\Condition;
 
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\system\Tests\Entity\EntityUnitTestBase;
 
 /**
@@ -49,7 +50,7 @@ function testConditions() {
     // of 'article' and set the context to the page type node.
     $condition = $manager->createInstance('node_type')
       ->setConfig('bundles', array('article' => 'article'))
-      ->setContextValue('node', $page);
+      ->setContextValue('node', EntityAdapter::createFromEntity($page));
     $this->assertFalse($condition->execute(), 'Page type nodes fail node type checks for articles.');
     // Check for the proper summary.
     $this->assertEqual('The node bundle is article', $condition->summary());
@@ -67,11 +68,11 @@ function testConditions() {
     $this->assertEqual('The node bundle is page or article', $condition->summary());
 
     // Set the context to the article node.
-    $condition->setContextValue('node', $article);
+    $condition->setContextValue('node', EntityAdapter::createFromEntity($article));
     $this->assertTrue($condition->execute(), 'Article type nodes pass node type checks for pages or articles');
 
     // Set the context to the test node.
-    $condition->setContextValue('node', $test);
+    $condition->setContextValue('node', EntityAdapter::createFromEntity($test));
     $this->assertFalse($condition->execute(), 'Test type nodes pass node type checks for pages or articles');
 
     // Check a greater than 2 bundles summary scenario.
@@ -79,7 +80,7 @@ function testConditions() {
     $this->assertEqual('The node bundle is page, article or test', $condition->summary());
 
     // Test Constructor injection.
-    $condition = $manager->createInstance('node_type', array('bundles' => array('article' => 'article'), 'context' => array('node' => $article)));
+    $condition = $manager->createInstance('node_type', array('bundles' => array('article' => 'article'), 'context' => array('node' => EntityAdapter::createFromEntity($article))));
     $this->assertTrue($condition->execute(), 'Constructor injection of context and configuration working as anticipated.');
   }
 }
diff --git a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php b/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
index 5b04cd5..7321fc9 100644
--- a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
+++ b/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
@@ -8,7 +8,9 @@
 namespace Drupal\system\Tests\Plugin;
 
 use Drupal\Component\Plugin\Exception\ContextException;
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\Core\Plugin\Context\ContextDefinition;
+use Drupal\node\Entity\NodeType;
 use Drupal\plugin_test\Plugin\MockBlockManager;
 use Drupal\simpletest\KernelTestBase;
 
@@ -26,6 +28,10 @@ class ContextPluginTest extends KernelTestBase {
    */
   function testContext() {
     $this->installEntitySchema('user');
+    $this->installEntitySchema('node');
+    $this->installEntitySchema('node_type');
+    $type = NodeType::create(['type' => 'page', 'name' => 'Page']);
+    $type->save();
 
     $name = $this->randomMachineName();
     $manager = new MockBlockManager();
@@ -61,14 +67,14 @@ function testContext() {
     }
 
     // Try to pass the wrong class type as a context value.
-    $plugin->setContextValue('user', $node);
+    $plugin->setContextValue('user', EntityAdapter::createFromEntity($node));
     $violations = $plugin->validateContexts();
     $this->assertTrue(!empty($violations), 'The provided context value does not pass validation.');
 
     // Set an appropriate context value and check to make sure its methods work
     // as expected.
     $user = entity_create('user', array('name' => $name));
-    $plugin->setContextValue('user', $user);
+    $plugin->setContextValue('user', EntityAdapter::createFromEntity($user));
 
     $this->assertEqual($plugin->getContextValue('user')->getUsername(), $user->getUsername());
     $this->assertEqual($user->label(), $plugin->getTitle());
@@ -79,14 +85,14 @@ function testContext() {
 
     // Test Complex compound context handling.
     $complex_plugin = $manager->createInstance('complex_context');
-    $complex_plugin->setContextValue('user', $user);
+    $complex_plugin->setContextValue('user', EntityAdapter::createFromEntity($user));
 
     // With only the user context set, try to get the context values.
     $values = $complex_plugin->getContextValues();
     $this->assertNull($values['node'], 'The node context is not yet set.');
     $this->assertNotNull($values['user'], 'The user context is set');
 
-    $complex_plugin->setContextValue('node', $node);
+    $complex_plugin->setContextValue('node', EntityAdapter::createFromEntity($node));
     $context_wrappers = $complex_plugin->getContexts();
     // Make sure what came out of the wrappers is good.
     $this->assertEqual($context_wrappers['user']->getContextValue()->label(), $user->label());
diff --git a/core/modules/system/tests/modules/condition_test/src/FormController.php b/core/modules/system/tests/modules/condition_test/src/FormController.php
index 4bf1230..0e3226e 100644
--- a/core/modules/system/tests/modules/condition_test/src/FormController.php
+++ b/core/modules/system/tests/modules/condition_test/src/FormController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\condition_test;
 
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Condition\ConditionManager;
 use Drupal\Core\Form\FormStateInterface;
@@ -70,7 +71,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     }
 
     $article = Node::load(1);
-    $this->condition->setContextValue('node', $article);
+    $this->condition->setContextValue('node', EntityAdapter::createFromEntity($article));
     if ($this->condition->execute()) {
       drupal_set_message(t('Executed successfully.'));
     }
diff --git a/core/modules/system/tests/modules/condition_test/src/Tests/ConditionTestDualUserTest.php b/core/modules/system/tests/modules/condition_test/src/Tests/ConditionTestDualUserTest.php
index ab498ba..4825b7e 100644
--- a/core/modules/system/tests/modules/condition_test/src/Tests/ConditionTestDualUserTest.php
+++ b/core/modules/system/tests/modules/condition_test/src/Tests/ConditionTestDualUserTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\condition_test\Tests;
 
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\Plugin\Context\ContextDefinition;
 use Drupal\simpletest\KernelTestBase;
@@ -72,7 +73,7 @@ protected function doTestIdenticalUser() {
         'user2' => 'anonymous',
       ]);
     $definition = new ContextDefinition('entity:user');
-    $contexts['anonymous'] = (new Context($definition))->setContextValue($this->anonymous);
+    $contexts['anonymous'] = new Context($definition, EntityAdapter::createFromEntity($this->anonymous));
     \Drupal::service('context.handler')->applyContextMapping($condition, $contexts);
     $this->assertTrue($condition->execute());
   }
@@ -89,8 +90,8 @@ protected function doTestDifferentUser() {
         'user2' => 'authenticated',
       ]);
     $definition = new ContextDefinition('entity:user');
-    $contexts['anonymous'] = (new Context($definition))->setContextValue($this->anonymous);
-    $contexts['authenticated'] = (new Context($definition))->setContextValue($this->authenticated);
+    $contexts['anonymous'] = new Context($definition, EntityAdapter::createFromEntity($this->anonymous));
+    $contexts['authenticated'] = new Context($definition, EntityAdapter::createFromEntity($this->authenticated));
     \Drupal::service('context.handler')->applyContextMapping($condition, $contexts);
     $this->assertFalse($condition->execute());
   }
diff --git a/core/modules/system/tests/modules/condition_test/src/Tests/OptionalContextConditionTest.php b/core/modules/system/tests/modules/condition_test/src/Tests/OptionalContextConditionTest.php
index f455905..0681365 100644
--- a/core/modules/system/tests/modules/condition_test/src/Tests/OptionalContextConditionTest.php
+++ b/core/modules/system/tests/modules/condition_test/src/Tests/OptionalContextConditionTest.php
@@ -7,9 +7,11 @@
 
 namespace Drupal\condition_test\Tests;
 
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\Plugin\Context\ContextDefinition;
 use Drupal\node\Entity\Node;
+use Drupal\node\Entity\NodeType;
 use Drupal\simpletest\KernelTestBase;
 
 /**
@@ -58,6 +60,8 @@ protected function testContextNoValue() {
    * Tests with both contexts mapped to the same user.
    */
   protected function testContextAvailable() {
+    $type = NodeType::create(['type' => 'example', 'name' => 'Example']);
+    $type->save();
     /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */
     $condition = \Drupal::service('plugin.manager.condition')
       ->createInstance('condition_test_optional_context')
@@ -66,7 +70,7 @@ protected function testContextAvailable() {
       ]);
     $definition = new ContextDefinition('entity:node');
     $node = Node::create(['type' => 'example']);
-    $contexts['node'] = (new Context($definition))->setContextValue($node);
+    $contexts['node'] = new Context($definition, EntityAdapter::createFromEntity($node));
     \Drupal::service('context.handler')->applyContextMapping($condition, $contexts);
     $this->assertFalse($condition->execute());
   }
diff --git a/core/modules/user/src/Tests/Condition/UserRoleConditionTest.php b/core/modules/user/src/Tests/Condition/UserRoleConditionTest.php
index 567ae06..c4ee781 100644
--- a/core/modules/user/src/Tests/Condition/UserRoleConditionTest.php
+++ b/core/modules/user/src/Tests/Condition/UserRoleConditionTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\user\Tests\Condition;
 
 use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\simpletest\KernelTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\Entity\User;
@@ -112,7 +113,7 @@ public function testConditions() {
     /** @var $condition \Drupal\Core\Condition\ConditionInterface */
     $condition = $this->manager->createInstance('user_role')
       ->setConfig('roles', array(RoleInterface::AUTHENTICATED_ID => RoleInterface::AUTHENTICATED_ID))
-      ->setContextValue('user', $this->anonymous);
+      ->setContextValue('user', EntityAdapter::createFromEntity($this->anonymous));
     $this->assertFalse($condition->execute(), 'Anonymous users fail role checks for authenticated.');
     // Check for the proper summary.
     // Summaries require an extra space due to negate handling in summary().
@@ -132,7 +133,7 @@ public function testConditions() {
 
     // Set the context to the authenticated user and check that they also pass
     // against anonymous or authenticated roles.
-    $condition->setContextValue('user', $this->authenticated);
+    $condition->setContextValue('user', EntityAdapter::createFromEntity($this->authenticated));
     $this->assertTrue($condition->execute(), 'Authenticated users pass role checks for anonymous or authenticated.');
 
     // Set the role to just authenticated and recheck.
@@ -140,7 +141,7 @@ public function testConditions() {
     $this->assertTrue($condition->execute(), 'Authenticated users pass role checks for authenticated.');
 
     // Test Constructor injection.
-    $condition = $this->manager->createInstance('user_role', array('roles' => array(RoleInterface::AUTHENTICATED_ID => RoleInterface::AUTHENTICATED_ID), 'context' => array('user' => $this->authenticated)));
+    $condition = $this->manager->createInstance('user_role', array('roles' => array(RoleInterface::AUTHENTICATED_ID => RoleInterface::AUTHENTICATED_ID), 'context' => array('user' => EntityAdapter::createFromEntity($this->authenticated))));
     $this->assertTrue($condition->execute(), 'Constructor injection of context and configuration working as anticipated.');
 
     // Check the negated summary.
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTypedDataTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTypedDataTest.php
index 49335a6..e684dd1 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTypedDataTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTypedDataTest.php
@@ -50,11 +50,10 @@ public function testGetContextValue() {
     \Drupal::setContainer($container);
 
     $definition = new ContextDefinition('any');
-    $context = new Context($definition);
     $data_definition = DataDefinition::create('string');
     $this->typedData = new StringData($data_definition);
     $this->typedData->setValue('example string');
-    $context->setContextData($this->typedData);
+    $context = new Context($definition, $this->typedData);
     $value = $context->getContextValue();
     $this->assertSame($value, $this->typedData->getValue());
   }
diff --git a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
index 8900fdd..03099e5 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
@@ -8,9 +8,12 @@
 namespace Drupal\Tests\Core\Plugin;
 
 use Drupal\Component\Plugin\ConfigurablePluginInterface;
+use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\Plugin\Context\ContextDefinition;
 use Drupal\Core\Plugin\Context\ContextHandler;
 use Drupal\Core\Plugin\ContextAwarePluginInterface;
+use Drupal\Core\TypedData\DataDefinition;
+use Drupal\Core\TypedData\Plugin\DataType\StringData;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -229,16 +232,20 @@ public function providerTestFilterPluginDefinitionsByContexts() {
    * @covers ::applyContextMapping
    */
   public function testApplyContextMapping() {
+    $context_hit_data = StringData::createInstance(DataDefinition::create('string'));
+    $context_hit_data->setValue('foo');
     $context_hit = $this->getMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context_hit->expects($this->atLeastOnce())
-      ->method('getContextValue')
-      ->will($this->returnValue(array('foo')));
+      ->method('getContextData')
+      ->will($this->returnValue($context_hit_data));
+    $context_miss_data = StringData::createInstance(DataDefinition::create('string'));
+    $context_miss_data->setValue('bar');
     $context_hit->expects($this->atLeastOnce())
       ->method('hasContextValue')
       ->willReturn(TRUE);
     $context_miss = $this->getMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context_miss->expects($this->never())
-      ->method('getContextValue');
+      ->method('getContextData');
 
     $contexts = array(
       'hit' => $context_hit,
@@ -256,7 +263,7 @@ public function testApplyContextMapping() {
       ->will($this->returnValue(array('hit' => $context_definition)));
     $plugin->expects($this->once())
       ->method('setContextValue')
-      ->with('hit', array('foo'));
+      ->with('hit', $context_hit_data);
 
     // Make sure that the cacheability metadata is passed to the plugin context.
     $plugin_context = $this->getMock('Drupal\Core\Plugin\Context\ContextInterface');
@@ -416,10 +423,12 @@ public function testApplyContextMappingNoValueNonRequired() {
    * @covers ::applyContextMapping
    */
   public function testApplyContextMappingConfigurableAssigned() {
+    $context_data = StringData::createInstance(DataDefinition::create('string'));
+    $context_data->setValue('foo');
     $context = $this->getMock('Drupal\Core\Plugin\Context\ContextInterface');
     $context->expects($this->atLeastOnce())
-      ->method('getContextValue')
-      ->will($this->returnValue(array('foo')));
+      ->method('getContextData')
+      ->will($this->returnValue($context_data));
     $context->expects($this->atLeastOnce())
       ->method('hasContextValue')
       ->willReturn(TRUE);
@@ -439,7 +448,7 @@ public function testApplyContextMappingConfigurableAssigned() {
       ->will($this->returnValue(array('hit' => $context_definition)));
     $plugin->expects($this->once())
       ->method('setContextValue')
-      ->with('hit', array('foo'));
+      ->with('hit', $context_data);
 
     // Make sure that the cacheability metadata is passed to the plugin context.
     $plugin_context = $this->getMock('Drupal\Core\Plugin\Context\ContextInterface');
