diff --git a/core/lib/Drupal/Component/Plugin/Context/Context.php b/core/lib/Drupal/Component/Plugin/Context/Context.php
index c891e62..852876a 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|null $context_value
+   *   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() {
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..4f58956 100644
--- a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
+++ b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
@@ -41,17 +41,30 @@
    *   The plugin implementation definition.
    */
   public function __construct(array $configuration, $plugin_id, $plugin_definition) {
-    $context = array();
-    if (isset($configuration['context'])) {
-      $context = $configuration['context'];
-      unset($configuration['context']);
-    }
+    $context_configuration = isset($configuration['context']) ? $configuration['context'] : [];
+    unset($configuration['context']);
+
     parent::__construct($configuration, $plugin_id, $plugin_definition);
-    foreach ($context as $key => $value) {
+
+    $this->contexts = $this->createContextFromConfiguration($context_configuration);
+  }
+
+  /**
+   * Creates context objects from any context mappings in configuration.
+   *
+   * @param array $context_configuration
+   *   An associative array of context names and values.
+   *
+   * @return \Drupal\Component\Plugin\Context\ContextInterface[]
+   *   An array of context objects.
+   */
+  protected function createContextFromConfiguration(array $context_configuration) {
+    $contexts = [];
+    foreach ($context_configuration as $key => $value) {
       $context_definition = $this->getContextDefinition($key);
-      $this->context[$key] = new Context($context_definition);
-      $this->context[$key]->setContextValue($value);
+      $contexts[$key] = new Context($context_definition, $value);
     }
+    return $contexts;
   }
 
   /**
@@ -124,7 +137,7 @@ public function getContextValue($name) {
    * {@inheritdoc}
    */
   public function setContextValue($name, $value) {
-    $this->getContext($name)->setContextValue($value);
+    $this->context[$name] = new Context($this->getContextDefinition($name), $value);
     return $this;
   }
 
diff --git a/core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php b/core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php
index 94f39fd..4d23e7b 100644
--- a/core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php
+++ b/core/lib/Drupal/Core/Language/ContextProvider/CurrentLanguageContext.php
@@ -57,8 +57,7 @@ public function getRuntimeContexts(array $unqualified_context_ids) {
     $result = [];
     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 = new Context(new ContextDefinition('language', $info[$type_key]['name']), $this->languageManager->getCurrentLanguage($type_key));
 
         $cacheability = new CacheableMetadata();
         $cacheability->setCacheContexts(['languages:' . $type_key]);
diff --git a/core/lib/Drupal/Core/Plugin/Context/Context.php b/core/lib/Drupal/Core/Plugin/Context/Context.php
index 837d601..7b66dcb 100644
--- a/core/lib/Drupal/Core/Plugin/Context/Context.php
+++ b/core/lib/Drupal/Core/Plugin/Context/Context.php
@@ -43,11 +43,19 @@ class Context extends ComponentContext implements ContextInterface {
   protected $cacheabilityMetadata;
 
   /**
-   * {@inheritdoc}
+   * Create a context object.
+   *
+   * @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition
+   *   The context definition.
+   * @param mixed $context_value|NULL
+   *   The context value object.
    */
-  public function __construct(ContextDefinitionInterface $context_definition) {
-    parent::__construct($context_definition);
+  public function __construct(ContextDefinitionInterface $context_definition, $context_value = NULL) {
+    parent::__construct($context_definition, NULL);
     $this->cacheabilityMetadata = new CacheableMetadata();
+    if (!is_null($context_value)) {
+      $this->setContextValue($context_value);
+    }
   }
 
   /**
@@ -80,19 +88,22 @@ public function hasContextValue() {
   }
 
   /**
-   * {@inheritdoc}
+   * Sets the context value.
+   *
+   * @param mixed $value
+   *   The value of this context, matching the context definition.
    */
-  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) {
       $this->addCacheableDependency($value);
     }
     if ($value instanceof TypedDataInterface) {
-      return $this->setContextData($value);
+      $this->contextData = $value;
     }
     else {
-      return $this->setContextData($this->getTypedDataManager()->create($this->contextDefinition->getDataDefinition(), $value));
+      $this->contextData = $this->getTypedDataManager()->create($this->contextDefinition->getDataDefinition(), $value);
     }
   }
 
@@ -119,13 +130,6 @@ public function getContextData() {
     return $this->contextData;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function setContextData(TypedDataInterface $data) {
-    $this->contextData = $data;
-    return $this;
-  }
 
   /**
    * {@inheritdoc}
@@ -170,4 +174,16 @@ public function getCacheMaxAge() {
     return $this->cacheabilityMetadata->getCacheMaxAge();
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public static function createFromContext(ContextInterface $old_context, $value) {
+    $context = new static($old_context->getContextDefinition(), $value);
+    $context->addCacheableDependency($old_context);
+    if (method_exists($old_context, 'getTypedDataManager')) {
+      $context->setTypedDataManager($old_context->getTypedDataManager());
+    }
+    return $context;
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php b/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
index 373c73c..8c31371 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
@@ -72,6 +72,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.
 
@@ -94,7 +95,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..967819a 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
@@ -17,6 +17,13 @@
 interface ContextInterface extends ComponentContextInterface, CacheableDependencyInterface {
 
   /**
+   * {@inheritdoc}
+   *
+   * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
+   */
+  public function getContextDefinition();
+
+  /**
    * Gets the context value as typed data object.
    *
    * @return \Drupal\Core\TypedData\TypedDataInterface
@@ -24,16 +31,6 @@
   public function getContextData();
 
   /**
-   * Sets the context value as typed data object.
-   *
-   * @param \Drupal\Core\TypedData\TypedDataInterface $data
-   *   The context value as a typed data object.
-   *
-   * @return $this
-   */
-  public function setContextData(TypedDataInterface $data);
-
-  /**
    * Adds a dependency on an object: merges its cacheability metadata.
    *
    * E.g. when a context depends on some configuration, an entity, or an access
@@ -51,4 +48,17 @@ public function setContextData(TypedDataInterface $data);
    */
   public function addCacheableDependency($dependency);
 
+  /**
+   * Creates a new context with a different value.
+   *
+   * @param \Drupal\Core\Plugin\Context\ContextInterface $old_context
+   *   The context object used to create a new object. Cacheability metadata
+   *   will be copied over.
+   * @param mixed $value
+   *   The value of the new context object.
+   *
+   * @return static
+   */
+  public static function createFromContext(ContextInterface $old_context, $value);
+
 }
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php
index 4f6b5ef..2c3c4e6 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextProviderInterface.php
@@ -32,8 +32,7 @@
    *   $node = ...
    *
    *   // Set that specific node as the value of the 'node' context.
-   *   $context = new Context(new ContextDefinition('entity:node'));
-   *   $context->setContextValue($node);
+   *   $context = new Context(new ContextDefinition('entity:node'), $node);
    *   return ['node' => $context];
    * @endcode
    *
diff --git a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
index 51a39d7..21ee311 100644
--- a/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
+++ b/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
@@ -30,6 +30,25 @@
   /**
    * {@inheritdoc}
    *
+   * @return \Drupal\Core\Plugin\Context\ContextInterface[]
+   */
+  protected function createContextFromConfiguration(array $context_configuration) {
+    // This method is overridden so that it will use
+    // \Drupal\Core\Plugin\Context\Context instead.
+    $contexts = [];
+    foreach ($context_configuration as $key => $value) {
+      $context_definition = $this->getContextDefinition($key);
+      $contexts[$key] = new Context($context_definition, $value);
+    }
+    return $contexts;
+  }
+
+  /**
+   * {@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 +74,14 @@ public function setContext($name, ComponentContextInterface $context) {
   /**
    * {@inheritdoc}
    */
+  public function setContextValue($name, $value) {
+    $this->context[$name] = Context::createFromContext($this->getContext($name), $value);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getContextMapping() {
     $configuration = $this instanceof ConfigurablePluginInterface ? $this->getConfiguration() : $this->configuration;
     return isset($configuration['context_mapping']) ? $configuration['context_mapping'] : [];
@@ -85,6 +112,15 @@ 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/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php b/core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php
index fea7f6d..eb35eb3 100644
--- a/core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php
+++ b/core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php
@@ -52,11 +52,9 @@ public function __construct(AccountInterface $account, EntityManagerInterface $e
   public function getRuntimeContexts(array $unqualified_context_ids) {
     $current_user = $this->userStorage->load($this->account->id());
 
-    $context1 = new Context(new ContextDefinition('entity:user', 'User 1'));
-    $context1->setContextValue($current_user);
+    $context1 = new Context(new ContextDefinition('entity:user', 'User 1'), $current_user);
 
-    $context2 = new Context(new ContextDefinition('entity:user', 'User 2'));
-    $context2->setContextValue($current_user);
+    $context2 = new Context(new ContextDefinition('entity:user', 'User 2'), $current_user);
 
     $cacheability = new CacheableMetadata();
     $cacheability->setCacheContexts(['user']);
diff --git a/core/modules/node/src/ContextProvider/NodeRouteContext.php b/core/modules/node/src/ContextProvider/NodeRouteContext.php
index 6f55b08..485245e 100644
--- a/core/modules/node/src/ContextProvider/NodeRouteContext.php
+++ b/core/modules/node/src/ContextProvider/NodeRouteContext.php
@@ -44,18 +44,22 @@ public function __construct(RouteMatchInterface $route_match) {
    */
   public function getRuntimeContexts(array $unqualified_context_ids) {
     $result = [];
-    $context = new Context(new ContextDefinition('entity:node', NULL, FALSE));
+    $context_definition = new ContextDefinition('entity:node', NULL, FALSE);
+    $value = NULL;
     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);
+        $value = $node;
       }
     }
     elseif ($this->routeMatch->getRouteName() == 'node.add') {
       $node_type = $this->routeMatch->getParameter('node_type');
-      $context->setContextValue(Node::create(array('type' => $node_type->id())));
+      $value = Node::create(array('type' => $node_type->id()));
     }
+
     $cacheability = new CacheableMetadata();
     $cacheability->setCacheContexts(['route']);
+
+    $context = new Context($context_definition, $value);
     $context->addCacheableDependency($cacheability);
     $result['node'] = $context;
 
diff --git a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php b/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
index 3508689..05c4c7e 100644
--- a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
+++ b/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\Component\Plugin\Exception\ContextException;
 use Drupal\Core\Plugin\Context\ContextDefinition;
+use Drupal\node\Entity\NodeType;
 use Drupal\plugin_test\Plugin\MockBlockManager;
 use Drupal\simpletest\KernelTestBase;
 
@@ -26,6 +27,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();
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..8c80467 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
@@ -72,7 +72,7 @@ protected function doTestIdenticalUser() {
         'user2' => 'anonymous',
       ]);
     $definition = new ContextDefinition('entity:user');
-    $contexts['anonymous'] = (new Context($definition))->setContextValue($this->anonymous);
+    $contexts['anonymous'] = new Context($definition, $this->anonymous);
     \Drupal::service('context.handler')->applyContextMapping($condition, $contexts);
     $this->assertTrue($condition->execute());
   }
@@ -89,8 +89,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, $this->anonymous);
+    $contexts['authenticated'] = new Context($definition, $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..d2b4ed0 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
@@ -10,6 +10,7 @@
 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 +59,7 @@ protected function testContextNoValue() {
    * Tests with both contexts mapped to the same user.
    */
   protected function testContextAvailable() {
+    NodeType::create(['type' => 'example', 'name' => 'Example'])->save();
     /** @var \Drupal\Core\Condition\ConditionPluginBase $condition */
     $condition = \Drupal::service('plugin.manager.condition')
       ->createInstance('condition_test_optional_context')
@@ -66,7 +68,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, $node);
     \Drupal::service('context.handler')->applyContextMapping($condition, $contexts);
     $this->assertFalse($condition->execute());
   }
diff --git a/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php b/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php
index 3eca4d6..4c3d0b6 100644
--- a/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php
+++ b/core/modules/system/tests/modules/display_variant_test/src/EventSubscriber/TestPageDisplayVariantSubscriber.php
@@ -29,8 +29,7 @@ public function onSelectPageDisplayVariant(PageDisplayVariantSelectionEvent $eve
     $event->setPluginConfiguration(['required_configuration' => 'A very important, required value.']);
     $event->addCacheTags(['custom_cache_tag']);
 
-    $context = new Context(new ContextDefinition('string', NULL, TRUE));
-    $context->setContextValue('Explicitly passed in context.');
+    $context = new Context(new ContextDefinition('string', NULL, TRUE), 'Explicitly passed in context.');
     $event->setContexts(['context' => $context]);
   }
 
diff --git a/core/modules/user/src/ContextProvider/CurrentUserContext.php b/core/modules/user/src/ContextProvider/CurrentUserContext.php
index 1a0f26c..0c66761 100644
--- a/core/modules/user/src/ContextProvider/CurrentUserContext.php
+++ b/core/modules/user/src/ContextProvider/CurrentUserContext.php
@@ -55,8 +55,7 @@ public function __construct(AccountInterface $account, EntityManagerInterface $e
   public function getRuntimeContexts(array $unqualified_context_ids) {
     $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')), $current_user);
     $cacheability = new CacheableMetadata();
     $cacheability->setCacheContexts(['user']);
     $context->addCacheableDependency($cacheability);
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php
index b59ed8a..892b574 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Context/ContextTest.php
@@ -83,10 +83,8 @@ public function testSetContextValueTypedData() {
       ->setMethods(array('getDefaultValue', 'getDataDefinition'))
       ->getMockForAbstractClass();
 
-    $context = new Context($this->contextDefinition);
-    $context->setTypedDataManager($this->typedDataManager);
     $typed_data = $this->getMock('Drupal\Core\TypedData\TypedDataInterface');
-    $context->setContextValue($typed_data);
+    $context = new Context($this->contextDefinition, $typed_data);
     $this->assertSame($typed_data, $context->getContextData());
   }
 
@@ -120,7 +118,7 @@ public function testSetContextValueCacheableDependency() {
       ->method('getCacheMaxAge')
       ->willReturn(60);
 
-    $context->setContextValue($cacheable_dependency);
+    $context = Context::createFromContext($context, $cacheable_dependency);
     $this->assertSame($cacheable_dependency, $context->getContextData());
     $this->assertEquals(['node:1'], $context->getCacheTags());
     $this->assertEquals(['route'], $context->getCacheContexts());
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..981f4c2 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/ContextHandlerTest.php
@@ -11,6 +11,8 @@
 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 +231,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 +262,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 +422,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 +447,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');
