diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
index 2bfdf41419..e5d7711b8b 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
@@ -12,6 +12,7 @@
  *   label = @Translation("Test entity - revisions and data table"),
  *   handlers = {
  *     "view_builder" = "Drupal\entity_test\EntityTestViewBuilder",
+ *     "storage" = "Drupal\entity_test\EntityTestProfilerStorage",
  *     "access" = "Drupal\entity_test\EntityTestAccessControlHandler",
  *     "form" = {
  *       "default" = "Drupal\entity_test\EntityTestForm",
diff --git a/core/modules/system/tests/modules/entity_test/src/EntityTestProfilerStorage.php b/core/modules/system/tests/modules/entity_test/src/EntityTestProfilerStorage.php
new file mode 100644
index 0000000000..03a3bfb6d4
--- /dev/null
+++ b/core/modules/system/tests/modules/entity_test/src/EntityTestProfilerStorage.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Drupal\entity_test;
+
+use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
+
+/**
+ * Test entity storage that collects information on expensive calls.
+ */
+class EntityTestProfilerStorage extends SqlContentEntityStorage {
+
+  /**
+   * Calls made to load an entity from storage, instead of the static cache.
+   *
+   * @var int
+   */
+  protected $entityLoadsFromStorage = 0;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getFromStorage(array $ids = NULL) {
+    $this->entityLoadsFromStorage++;
+    return parent::getFromStorage($ids);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function loadRevision($revision_id) {
+    $this->entityLoadsFromStorage++;
+    return parent::loadRevision($revision_id);
+  }
+
+  /**
+   * The number of times a call resulted in an entity being loaded from storage.
+   *
+   * @return int
+   *   The number or entity loads from storage.
+   */
+  public function getEntityLoadsFromStorage() {
+    return $this->entityLoadsFromStorage;
+  }
+
+}
diff --git a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
index d2fd2f5241..501a72112b 100644
--- a/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterLatestRevisionTest.php
@@ -126,28 +126,25 @@ public function testWithTranslatedPendingRevision() {
    * Tests that pending revisions are loaded only when needed.
    */
   public function testOptimizedConvert() {
+    /** @var \Drupal\entity_test\EntityTestProfilerStorage $storage */
+    $storage = $this->container->get('entity_type.manager')->getStorage('entity_test_mulrev');
+
     $entity = EntityTestMulRev::create();
     $entity->save();
+    $this->assertEquals(0, $storage->getEntityLoadsFromStorage());
 
     // Populate static cache for the current entity.
     $entity = EntityTestMulRev::load($entity->id());
-
-    // Delete the base table entry for the current entity, however, since the
-    // storage will query the revision table to get the latest revision, the
-    // logic handling pending revisions will work correctly anyway.
-    /** @var \Drupal\Core\Database\Connection $database */
-    $database = $this->container->get('database');
-    $database->delete('entity_test_mulrev')
-      ->condition('id', $entity->id())
-      ->execute();
+    $this->assertEquals(1, $storage->getEntityLoadsFromStorage());
 
     // If optimization works, converting a default revision should not trigger
-    // a storage load, thus making the following assertion pass.
+    // a storage load.
     $converted = $this->converter->convert(1, [
       'load_latest_revision' => TRUE,
       'type' => 'entity:entity_test_mulrev',
     ], 'foo', []);
     $this->assertEquals($entity->getLoadedRevisionId(), $converted->getLoadedRevisionId());
+    $this->assertEquals(1, $storage->getEntityLoadsFromStorage());
   }
 
 }
