diff --git a/core/modules/media/tests/src/Kernel/MediaResourceTest.php b/core/modules/media/tests/src/Kernel/MediaResourceTest.php
new file mode 100644
index 0000000..0623257
--- /dev/null
+++ b/core/modules/media/tests/src/Kernel/MediaResourceTest.php
@@ -0,0 +1,47 @@
+<?php
+
+namespace Drupal\Tests\media\Kernel;
+
+use Drupal\Component\Plugin\Exception\PluginNotFoundException;
+use Drupal\KernelTests\KernelTestBase;
+use Drupal\rest\Entity\RestResourceConfig;
+use Drupal\rest\RestResourceConfigInterface;
+
+/**
+ * @group media
+ *
+ * @todo Remove this in https://www.drupal.org/node/2895573
+ */
+class MediaResourceTest extends KernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['serialization', 'rest', 'media'];
+
+  /**
+   * @dataProvider providerTestEnableMediaEntityType
+   */
+  public function testEnableMediaResource($entity_type_id) {
+    $this->setExpectedException(PluginNotFoundException::class, 'The "entity:' . $entity_type_id . '" plugin does not exist.');
+    RestResourceConfig::create([
+      'id' => 'entity.' . $entity_type_id,
+      'granularity' => RestResourceConfigInterface::RESOURCE_GRANULARITY,
+      'configuration' => [
+        'methods' => ['GET'],
+        'formats' => ['json'],
+        'authentication' => ['cookie'],
+      ],
+    ])
+      ->enable()
+      ->save();
+  }
+
+  public function providerTestEnableMediaEntityType() {
+    return [
+      ['media'],
+      ['media_type'],
+    ];
+  }
+
+}
