diff --git a/core/lib/Drupal/Component/FileCache/FileCache.php b/core/lib/Drupal/Component/FileCache/FileCache.php
index 761d490..5fcdaa9 100644
--- a/core/lib/Drupal/Component/FileCache/FileCache.php
+++ b/core/lib/Drupal/Component/FileCache/FileCache.php
@@ -153,4 +153,11 @@ public function delete($filepath) {
     }
   }
 
+  /**
+   * Resets the static cache.
+   */
+  public static function reset() {
+    static::$cached = [];
+  }
+
 }
diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php
index c560e25..a584cce 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBase.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBase.php
@@ -7,6 +7,9 @@
 
 namespace Drupal\KernelTests;
 
+use Drupal\Component\FileCache\ApcuFileCacheBackend;
+use Drupal\Component\FileCache\FileCache;
+use Drupal\Component\FileCache\FileCacheFactory;
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Config\ConfigImporter;
@@ -212,6 +215,7 @@ protected function setUp() {
     parent::setUp();
 
     $this->root = static::getDrupalRoot();
+    $this->initFileCache();
     $this->bootEnvironment();
     $this->bootKernel();
   }
@@ -480,6 +484,32 @@ private function getCompiledContainerBuilder(array $modules) {
   }
 
   /**
+   * Initializes the FileCacheFactory component.
+   *
+   * We can not use the Settings object in a component, that's why we have to do
+   * it here instead of \Drupal\Component\FileCache\FileCacheFactory.
+   */
+  protected function initFileCache() {
+    $configuration = Settings::get('file_cache');
+
+    // Provide a default configuration, if not set.
+    if (!isset($configuration['default'])) {
+      $configuration['default'] = [
+        'class' => FileCache::class,
+        'cache_backend_class' => NULL,
+        'cache_backend_configuration' => [],
+      ];
+      // @todo Use extension_loaded('apcu') for non-testbot
+      //  https://www.drupal.org/node/2447753.
+      if (function_exists('apc_fetch')) {
+        $configuration['default']['cache_backend_class'] = ApcuFileCacheBackend::class;
+      }
+    }
+    FileCacheFactory::setConfiguration($configuration);
+    FileCacheFactory::setPrefix(Settings::getApcuPrefix('file_cache', $this->root));
+  }
+
+  /**
    * Returns Extension objects for $modules to enable.
    *
    * @param string[] $modules
@@ -625,6 +655,9 @@ protected function tearDown() {
       }
     }
 
+    // Clean FileCache cache.
+    FileCache::reset();
+
     // Clean up statics, container, and settings.
     if (function_exists('drupal_static_reset')) {
       drupal_static_reset();
