diff --git a/core/modules/system/src/Tests/Ajax/AjaxFormCacheTest.php b/core/modules/system/src/Tests/Ajax/AjaxFormCacheTest.php
new file mode 100644
index 0000000..7d73c82
--- /dev/null
+++ b/core/modules/system/src/Tests/Ajax/AjaxFormCacheTest.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Ajax\AjaxFormCacheTest.
+ */
+
+namespace Drupal\system\Tests\Ajax;
+
+use Drupal\Core\Url;
+
+/**
+ * Tests the usage of form caching for AJAX forms.
+ *
+ * @group Ajax
+ */
+class AjaxFormCacheTest extends AjaxTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testFormCacheUsage() {
+    /** @var \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable */
+    $key_value_expirable = \Drupal::service('keyvalue.expirable')->get('form');
+    $this->drupalLogin($this->rootUser);
+
+    // Ensure that the cache is empty.
+    $this->assertEqual(0, count($key_value_expirable->getAll()));
+
+    // Visit an AJAX form that is not cached, 3 times.
+    $uncached_form_url = Url::fromRoute('ajax_forms_test.commands_form');
+    $this->drupalGet($uncached_form_url);
+    $this->drupalGet($uncached_form_url);
+    $this->drupalGet($uncached_form_url);
+
+    // The number of cache entries should not have changed.
+    $this->assertEqual(0, count($key_value_expirable->getAll()));
+
+    // Visit a form that is explicitly cached, 3 times.
+    $cached_form_url = Url::fromRoute('ajax_forms_test.get_form');
+    $this->drupalGet($cached_form_url);
+    $this->drupalGet($cached_form_url);
+    $this->drupalGet($cached_form_url);
+
+    // The number of cache entries should be exactly 3.
+    $this->assertEqual(3, count($key_value_expirable->getAll()));
+  }
+
+}
