diff --git a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php b/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php
new file mode 100644
index 0000000..a74254b
--- /dev/null
+++ b/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php
@@ -0,0 +1,65 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config\Tests\CacheabilityMetadataConfigOverrideIntegrationTest.
+ */
+
+namespace Drupal\config\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests if configuration overrides correctly affect cacheability metadata.
+ *
+ * @group config
+ */
+class CacheabilityMetadataConfigOverrideIntegrationTest extends WebTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'block_test',
+    'config_override_integration_test',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    // @discuss If our block does not contain any content then the cache context
+    // is not bubbling up and the test fails. This probably indicates a bug
+    // since the title of the block is rendered, so the context is useful.
+    \Drupal::state()->set('block_test.content', 'Needs to have some content');
+
+    $this->drupalLogin($this->drupalCreateUser());
+  }
+
+  /**
+   * Tests if config overrides correctly set cacheability metadata.
+   */
+  public function testConfigOverride() {
+    // Check the default (disabled) state of the cache context. The block label
+    // should not be overridden.
+    $this->drupalGet('<front>');
+    $this->assertNoText('Overridden block label');
+
+    // Both the cache context and tag should be present.
+    $this->assertCacheContext('config_override_integration_test');
+    $this->assertCacheTag('config_override_integration_test_tag');
+
+    // Flip the state of the cache context. The block label should now be
+    // overridden.
+    \Drupal::state()->set('config_override_integration_test.enabled', 'yes');
+    $this->drupalGet('<front>');
+    $this->assertText('Overridden block label');
+
+    // Both the cache context and tag should still be present.
+    $this->assertCacheContext('config_override_integration_test');
+    $this->assertCacheTag('config_override_integration_test_tag');
+  }
+
+}
diff --git a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php b/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php
new file mode 100644
index 0000000..cc6e024
--- /dev/null
+++ b/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideTest.php
@@ -0,0 +1,84 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config\Tests\CacheabilityMetadataConfigOverrideTest.
+ */
+
+namespace Drupal\config\Tests;
+
+use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\config_override_test\Cache\PirateDayCacheContext;
+use Drupal\simpletest\KernelTestBase;
+
+/**
+ * Tests if configuration overrides correctly affect cacheability metadata.
+ *
+ * @group config
+ */
+class CacheabilityMetadataConfigOverrideTest extends KernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'block',
+    'block_content',
+    'config',
+    'config_override_test',
+    'system',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+    $this->installEntitySchema('block_content');
+    $this->installConfig(['config_override_test']);
+  }
+
+  /**
+   * Tests if config overrides correctly set cacheability metadata.
+   */
+  public function testConfigOverride() {
+    // It's pirate day today!
+    $GLOBALS['it_is_pirate_day'] = TRUE;
+
+    $config_factory = $this->container->get('config.factory');
+    $config = $config_factory->get('system.theme');
+
+    // Check that we are using the Pirate theme.
+    $theme = $config->get('default');
+    $this->assertEqual('pirate', $theme);
+
+    // Check that the cacheability metadata is correct.
+    $this->assertEqual(['pirate_day'], $config->getCacheContexts());
+    $this->assertEqual(['config:system.theme', 'pirate-day-tag'], $config->getCacheTags());
+    $this->assertEqual(PirateDayCacheContext::PIRATE_DAY_MAX_AGE, $config->getCacheMaxAge());
+  }
+
+  /**
+   * Tests if config overrides set cacheability metadata on config entities.
+   */
+  public function testConfigEntityOverride() {
+    // It's pirate day today!
+    $GLOBALS['it_is_pirate_day'] = TRUE;
+
+    // Load the User login block and check that its cacheability metadata is
+    // overridden correctly. This verifies that the metadata is correctly
+    // applied to config entities.
+    /** @var EntityManagerInterface $entity_manager */
+    $entity_manager = $this->container->get('entity.manager');
+    $block = $entity_manager->getStorage('block')->load('call_to_action');
+
+    // Check that our call to action message is appealing to filibusters.
+    $this->assertEqual($block->label(), 'Draw yer cutlasses!');
+
+    // Check that the cacheability metadata is correct.
+    $this->assertEqual(['pirate_day'], $block->getCacheContexts());
+    $this->assertEqual(['config:block.block.call_to_action', 'pirate-day-tag'], $block->getCacheTags());
+    $this->assertEqual(PirateDayCacheContext::PIRATE_DAY_MAX_AGE, $block->getCacheMaxAge());
+  }
+
+}
diff --git a/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php b/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php
index 2867c7d..8dad5bb 100644
--- a/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php
+++ b/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\config_entity_static_cache_test;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\ConfigFactoryOverrideInterface;
 use Drupal\Core\Config\StorageInterface;
 
@@ -40,4 +41,25 @@ public function createConfigObject($name, $collection = StorageInterface::DEFAUL
     return NULL;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheContexts() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheTags() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheMaxAge() {
+    return Cache::PERMANENT;
+  }
+
 }
diff --git a/core/modules/config/tests/config_override_integration_test/config/install/block.block.config_override_test.yml b/core/modules/config/tests/config_override_integration_test/config/install/block.block.config_override_test.yml
new file mode 100644
index 0000000..be0616f
--- /dev/null
+++ b/core/modules/config/tests/config_override_integration_test/config/install/block.block.config_override_test.yml
@@ -0,0 +1,24 @@
+id: config_override_test
+theme: classy
+weight: 0
+status: true
+langcode: en
+region: content
+plugin: test_cache
+settings:
+  label: 'Test HTML block'
+  provider: block_test
+  label_display: visible
+  status: true
+  info: ''
+  view_mode: default
+dependencies:
+  module:
+    - block_test
+  theme:
+    - classy
+visibility:
+  request_path:
+    id: request_path
+    pages: ''
+    negate: false
diff --git a/core/modules/config/tests/config_override_integration_test/config_override_integration_test.info.yml b/core/modules/config/tests/config_override_integration_test/config_override_integration_test.info.yml
new file mode 100644
index 0000000..22b1e94
--- /dev/null
+++ b/core/modules/config/tests/config_override_integration_test/config_override_integration_test.info.yml
@@ -0,0 +1,9 @@
+name: 'Configuration override integration test'
+type: module
+package: Testing
+version: VERSION
+core: 8.x
+
+dependencies:
+  - block
+  - block_test
diff --git a/core/modules/config/tests/config_override_integration_test/config_override_integration_test.services.yml b/core/modules/config/tests/config_override_integration_test/config_override_integration_test.services.yml
new file mode 100644
index 0000000..147874e
--- /dev/null
+++ b/core/modules/config/tests/config_override_integration_test/config_override_integration_test.services.yml
@@ -0,0 +1,9 @@
+services:
+  cache_context.config_override_integration_test:
+    class: Drupal\config_override_integration_test\Cache\ConfigOverrideIntegrationTestCacheContext
+    tags:
+      - { name: cache.context }
+  config_override_integration_test.config_override:
+    class: Drupal\config_override_integration_test\CacheabilityMetadataConfigOverride
+    tags:
+      - { name: config.factory.override }
diff --git a/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php b/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php
new file mode 100644
index 0000000..23e228b
--- /dev/null
+++ b/core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config_override_integration_test\Cache\ConfigOverrideIntegrationTestCacheContext.
+ */
+
+namespace Drupal\config_override_integration_test\Cache;
+
+use Drupal\Core\Cache\Context\CacheContextInterface;
+
+/**
+ * A cache context service intended for the config override integration test.
+ *
+ * Cache context ID: 'config_override_integration_test'.
+ */
+class ConfigOverrideIntegrationTestCacheContext implements CacheContextInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getLabel() {
+    return t('Config override integration test');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getContext() {
+    // Default to the 'disabled' state.
+    $state = \Drupal::state()->get('config_override_integration_test.enabled', 'no');
+    return 'config_override_integration_test.' . $state;
+  }
+
+}
diff --git a/core/modules/config/tests/config_override_integration_test/src/CacheabilityMetadataConfigOverride.php b/core/modules/config/tests/config_override_integration_test/src/CacheabilityMetadataConfigOverride.php
new file mode 100644
index 0000000..e80eeec
--- /dev/null
+++ b/core/modules/config/tests/config_override_integration_test/src/CacheabilityMetadataConfigOverride.php
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config_override_integration_test\CacheabilityMetadataConfigOverride.
+ */
+
+namespace Drupal\config_override_integration_test;
+
+use Drupal\Core\Cache\Cache;
+use Drupal\Core\Config\ConfigFactoryOverrideInterface;
+use Drupal\Core\Config\StorageInterface;
+
+/**
+ * Test implementation of a config override that provides cacheability metadata.
+ */
+class CacheabilityMetadataConfigOverride implements ConfigFactoryOverrideInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function loadOverrides($names) {
+    $overrides = [];
+
+    // Override the test block depending on the state set in the test.
+    $state = \Drupal::state()->get('config_override_integration_test.enabled', 'no');
+    if (in_array('block.block.config_override_test', $names) && $state !== 'no') {
+      $overrides = $overrides + [
+        'block.block.config_override_test' => [
+          'settings' => ['label' => 'Overridden block label'],
+        ],
+      ];
+    }
+
+    return $overrides;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheSuffix() {
+    return 'config_override_integration_test';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
+    return NULL;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheContexts() {
+    return ['config_override_integration_test'];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheTags() {
+    return ['config_override_integration_test_tag'];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheMaxAge() {
+    return Cache::PERMANENT;
+  }
+
+}
diff --git a/core/modules/config/tests/config_override_test/config/install/block.block.call_to_action.yml b/core/modules/config/tests/config_override_test/config/install/block.block.call_to_action.yml
new file mode 100644
index 0000000..8951c0d
--- /dev/null
+++ b/core/modules/config/tests/config_override_test/config/install/block.block.call_to_action.yml
@@ -0,0 +1,26 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - block_content
+  theme:
+    - classy
+id: call_to_action
+theme: classy
+region: content
+weight: null
+provider: null
+plugin: 'block_content:d7c9d8ba-663f-41b4-8756-86bc55c44653'
+settings:
+  id: 'block_content:d7c9d8ba-663f-41b4-8756-86bc55c44653'
+  label: 'Shop for cheap now!'
+  provider: block_content
+  label_display: visible
+  status: true
+  info: ''
+  view_mode: default
+visibility:
+  request_path:
+    id: request_path
+    pages: ''
+    negate: false
diff --git a/core/modules/config/tests/config_override_test/config_override_test.info.yml b/core/modules/config/tests/config_override_test/config_override_test.info.yml
index f1f1109..051729d 100644
--- a/core/modules/config/tests/config_override_test/config_override_test.info.yml
+++ b/core/modules/config/tests/config_override_test/config_override_test.info.yml
@@ -3,3 +3,7 @@ type: module
 package: Testing
 version: VERSION
 core: 8.x
+
+dependencies:
+  - block
+  - block_content
diff --git a/core/modules/config/tests/config_override_test/config_override_test.services.yml b/core/modules/config/tests/config_override_test/config_override_test.services.yml
index c3fae64..1a07412 100644
--- a/core/modules/config/tests/config_override_test/config_override_test.services.yml
+++ b/core/modules/config/tests/config_override_test/config_override_test.services.yml
@@ -1,4 +1,8 @@
 services:
+  cache_context.pirate_day:
+    class: Drupal\config_override_test\Cache\PirateDayCacheContext
+    tags:
+      - { name: cache.context }
   config_override_test.overrider:
     class: Drupal\config_override_test\ConfigOverrider
     tags:
@@ -7,3 +11,7 @@ services:
     class: Drupal\config_override_test\ConfigOverriderLowPriority
     tags:
       - { name: config.factory.override, priority: -100 }
+  config_override_test.pirate_day_cacheability_metadata_override:
+    class: Drupal\config_override_test\PirateDayCacheabilityMetadataConfigOverride
+    tags:
+      - { name: config.factory.override }
diff --git a/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php b/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php
new file mode 100644
index 0000000..80e6000
--- /dev/null
+++ b/core/modules/config/tests/config_override_test/src/Cache/PirateDayCacheContext.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config_override_test\Cache\PirateDayCacheContext.
+ */
+
+namespace Drupal\config_override_test\Cache;
+
+use Drupal\Core\Cache\Context\CacheContextInterface;
+
+/**
+ * Defines the PirateDayCacheContext service that allows to cache the booty.
+ *
+ * Cache context ID: 'pirate_day'.
+ */
+class PirateDayCacheContext implements CacheContextInterface {
+
+  /**
+   * The length of Pirate Day. It lasts 24 hours.
+   */
+  const PIRATE_DAY_MAX_AGE = 86400;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getLabel() {
+    return t('Pirate day');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getContext() {
+    $is_pirate_day = static::isPirateDay() ? 'yarr' : 'nay';
+    return "pirate_day." . $is_pirate_day;
+  }
+
+  /**
+   * Returns whether or not it is Pirate Day.
+   *
+   * To ease testing this is determined with a global variable rather than using
+   * the traditional compass and sextant.
+   *
+   * @return bool
+   *   Returns TRUE if it is Pirate Day today.
+   */
+  public static function isPirateDay() {
+    return !empty($GLOBALS['it_is_pirate_day']);
+  }
+
+}
diff --git a/core/modules/config/tests/config_override_test/src/ConfigOverrider.php b/core/modules/config/tests/config_override_test/src/ConfigOverrider.php
index 8eb3836..b985782 100644
--- a/core/modules/config/tests/config_override_test/src/ConfigOverrider.php
+++ b/core/modules/config/tests/config_override_test/src/ConfigOverrider.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\config_override_test;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\ConfigFactoryOverrideInterface;
 
 /**
@@ -44,5 +45,26 @@ public function createConfigObject($name, $collection = StorageInterface::DEFAUL
     return NULL;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheContexts() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheTags() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheMaxAge() {
+    return Cache::PERMANENT;
+  }
+
 }
 
diff --git a/core/modules/config/tests/config_override_test/src/ConfigOverriderLowPriority.php b/core/modules/config/tests/config_override_test/src/ConfigOverriderLowPriority.php
index 6b11e0a..1d6f073 100644
--- a/core/modules/config/tests/config_override_test/src/ConfigOverriderLowPriority.php
+++ b/core/modules/config/tests/config_override_test/src/ConfigOverriderLowPriority.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\config_override_test;
 
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\ConfigFactoryOverrideInterface;
 use Drupal\Core\Config\StorageInterface;
 
@@ -49,5 +50,25 @@ public function createConfigObject($name, $collection = StorageInterface::DEFAUL
     return NULL;
   }
 
-}
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheContexts() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheTags() {
+    return [];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheMaxAge() {
+    return Cache::PERMANENT;
+  }
 
+}
diff --git a/core/modules/config/tests/config_override_test/src/PirateDayCacheabilityMetadataConfigOverride.php b/core/modules/config/tests/config_override_test/src/PirateDayCacheabilityMetadataConfigOverride.php
new file mode 100644
index 0000000..86779d7
--- /dev/null
+++ b/core/modules/config/tests/config_override_test/src/PirateDayCacheabilityMetadataConfigOverride.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\config_override_test\PirateDayCacheabilityMetadataConfigOverride.
+ */
+
+namespace Drupal\config_override_test;
+
+use Drupal\config_override_test\Cache\PirateDayCacheContext;
+use Drupal\Core\Config\ConfigFactoryOverrideInterface;
+use Drupal\Core\Config\StorageInterface;
+
+/**
+ * Test implementation of a config override that provides cacheability metadata.
+ */
+class PirateDayCacheabilityMetadataConfigOverride implements ConfigFactoryOverrideInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function loadOverrides($names) {
+    $overrides = [];
+
+    // Override the theme and the 'call_to_action' block on Pirate Day.
+    if (PirateDayCacheContext::isPirateDay()) {
+      if (in_array('system.theme', $names)) {
+        $overrides = $overrides + ['system.theme' => ['default' => 'pirate']];
+      }
+      if (in_array('block.block.call_to_action', $names)) {
+        $overrides = $overrides + [
+          'block.block.call_to_action' => [
+            'settings' => ['label' => 'Draw yer cutlasses!'],
+          ],
+        ];
+      }
+    }
+
+    return $overrides;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheSuffix() {
+    return 'PirateDayConfigOverrider';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
+    return NULL;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheContexts() {
+    return ['pirate_day'];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheTags() {
+    return ['pirate-day-tag'];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCacheMaxAge() {
+    return PirateDayCacheContext::PIRATE_DAY_MAX_AGE;
+  }
+
+}
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
index c4413eb..ae1aa1d 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Tests\Core\Config\Entity {
 
+use Drupal\Core\Cache\Cache;
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Language\Language;
@@ -611,6 +612,18 @@ public function testSaveChangedUuid() {
         array('', array('id' => 'foo')),
         array('id', 'foo'),
       )));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheContexts')
+      ->will($this->returnValue([]));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheTags')
+      ->will($this->returnValue(['config:foo']));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheMaxAge')
+      ->will($this->returnValue(Cache::PERMANENT));
+    $config_object->expects($this->exactly(1))
+      ->method('getName')
+      ->will($this->returnValue('foo'));
 
     $this->cacheTagsInvalidator->expects($this->never())
       ->method('invalidateTags');
@@ -664,6 +677,18 @@ public function testLoad() {
         array('', array('id' => 'foo')),
         array('id', 'foo'),
       )));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheContexts')
+      ->will($this->returnValue([]));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheTags')
+      ->will($this->returnValue(['config:foo']));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheMaxAge')
+      ->will($this->returnValue(Cache::PERMANENT));
+    $config_object->expects($this->exactly(1))
+      ->method('getName')
+      ->will($this->returnValue('foo'));
 
     $this->configFactory->expects($this->once())
       ->method('loadMultiple')
@@ -694,6 +719,19 @@ public function testLoadMultipleAll() {
         array('', array('id' => 'foo')),
         array('id', 'foo'),
       )));
+    $foo_config_object->expects($this->exactly(1))
+      ->method('getCacheContexts')
+      ->will($this->returnValue([]));
+    $foo_config_object->expects($this->exactly(1))
+      ->method('getCacheTags')
+      ->will($this->returnValue(['config:foo']));
+    $foo_config_object->expects($this->exactly(1))
+      ->method('getCacheMaxAge')
+      ->will($this->returnValue(Cache::PERMANENT));
+    $foo_config_object->expects($this->exactly(1))
+      ->method('getName')
+      ->will($this->returnValue('foo'));
+
     $bar_config_object = $this->getMockBuilder('Drupal\Core\Config\Config')
       ->disableOriginalConstructor()
       ->getMock();
@@ -703,6 +741,18 @@ public function testLoadMultipleAll() {
         array('', array('id' => 'bar')),
         array('id', 'bar'),
       )));
+    $bar_config_object->expects($this->exactly(1))
+      ->method('getCacheContexts')
+      ->will($this->returnValue([]));
+    $bar_config_object->expects($this->exactly(1))
+      ->method('getCacheTags')
+      ->will($this->returnValue(['config:bar']));
+    $bar_config_object->expects($this->exactly(1))
+      ->method('getCacheMaxAge')
+      ->will($this->returnValue(Cache::PERMANENT));
+    $bar_config_object->expects($this->exactly(1))
+      ->method('getName')
+      ->will($this->returnValue('foo'));
 
     $this->configFactory->expects($this->once())
       ->method('listAll')
@@ -742,6 +792,18 @@ public function testLoadMultipleIds() {
         array('', array('id' => 'foo')),
         array('id', 'foo'),
       )));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheContexts')
+      ->will($this->returnValue([]));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheTags')
+      ->will($this->returnValue(['config:foo']));
+    $config_object->expects($this->exactly(1))
+      ->method('getCacheMaxAge')
+      ->will($this->returnValue(Cache::PERMANENT));
+    $config_object->expects($this->exactly(1))
+      ->method('getName')
+      ->will($this->returnValue('foo'));
 
     $this->configFactory->expects($this->once())
       ->method('loadMultiple')
