diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php
index 95e85e21a4..ac10ad307a 100644
--- a/core/lib/Drupal/Core/Entity/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Entity.php
@@ -508,24 +508,30 @@ public function getCacheMaxAge() {
    * {@inheritdoc}
    */
   public static function load($id) {
-    $entity_manager = \Drupal::entityManager();
-    return $entity_manager->getStorage($entity_manager->getEntityTypeFromClass(get_called_class()))->load($id);
+    $entity_repository = \Drupal::service('entity_type.repository');
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $storage = $entity_type_manager->getStorage($entity_repository->getEntityTypeFromClass(get_called_class()));
+    return $storage->load($id);
   }
 
   /**
    * {@inheritdoc}
    */
   public static function loadMultiple(array $ids = NULL) {
-    $entity_manager = \Drupal::entityManager();
-    return $entity_manager->getStorage($entity_manager->getEntityTypeFromClass(get_called_class()))->loadMultiple($ids);
+    $entity_repository = \Drupal::service('entity_type.repository');
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $storage = $entity_type_manager->getStorage($entity_repository->getEntityTypeFromClass(get_called_class()));
+    return $storage->loadMultiple($ids);
   }
 
   /**
    * {@inheritdoc}
    */
   public static function create(array $values = []) {
-    $entity_manager = \Drupal::entityManager();
-    return $entity_manager->getStorage($entity_manager->getEntityTypeFromClass(get_called_class()))->create($values);
+    $entity_repository = \Drupal::service('entity_type.repository');
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $storage = $entity_type_manager->getStorage($entity_repository->getEntityTypeFromClass(get_called_class()));
+    return $storage->create($values);
   }
 
   /**
diff --git a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
index 06820d0631..57e681d961 100644
--- a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
+++ b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
@@ -4,6 +4,8 @@
 
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Entity\EntityTypeRepositoryInterface;
 use Drupal\language\Entity\ContentLanguageSettings;
 use Drupal\Tests\UnitTestCase;
 
@@ -254,16 +256,31 @@ public function testLoadByEntityTypeBundle($config_id, ContentLanguageSettings $
       ->method('create')
       ->will($this->returnValue($nullConfig));
 
+    // Since loadByEntityTypeBundle() uses both entity_manager and
+    // entity_type.manager, we have to mock both of these services with the same
+    // storage interface object.
     $this->entityManager
       ->expects($this->any())
       ->method('getStorage')
       ->with('language_content_settings')
       ->will($this->returnValue($this->configEntityStorageInterface));
-    $this->entityManager->expects($this->any())
+
+    $entity_type_manager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
+    $entity_type_manager
+      ->expects($this->any())
+      ->method('getStorage')
+      ->with('language_content_settings')
+      ->will($this->returnValue($this->configEntityStorageInterface));
+
+    $entity_type_repository = $this->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
+    $entity_type_repository->expects($this->any())
       ->method('getEntityTypeFromClass')
-      ->with('Drupal\language\Entity\ContentLanguageSettings')
+      ->with(ContentLanguageSettings::class)
       ->willReturn('language_content_settings');
 
+    \Drupal::getContainer()->set('entity_type.manager', $entity_type_manager);
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+
     $config = ContentLanguageSettings::loadByEntityTypeBundle($type, $bundle);
 
     $this->assertSame($expected_langcode, $config->getDefaultLangcode());
diff --git a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
index bc9663dcf2..de2a72c4a2 100644
--- a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
+++ b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
@@ -3,6 +3,8 @@
 namespace Drupal\Tests\responsive_image\Unit;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Entity\EntityTypeRepositoryInterface;
 use Drupal\responsive_image\Entity\ResponsiveImageStyle;
 use Drupal\Tests\UnitTestCase;
 
@@ -74,11 +76,15 @@ public function testCalculateDependencies() {
       ->method('loadMultiple')
       ->with(array_keys($styles))
       ->willReturn($styles);
-    $this->entityManager->expects($this->any())
+
+    $entity_type_manager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
+    $entity_type_manager->expects($this->any())
       ->method('getStorage')
       ->with('image_style')
       ->willReturn($storage);
-    $this->entityManager->expects($this->any())
+
+    $entity_type_repository = $this->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
+    $entity_type_repository->expects($this->any())
       ->method('getEntityTypeFromClass')
       ->with('Drupal\image\Entity\ImageStyle')
       ->willReturn('image_style');
@@ -103,6 +109,9 @@ public function testCalculateDependencies() {
       ->with('test_group')
       ->willReturn(['bartik' => 'theme', 'toolbar' => 'module']);
 
+    \Drupal::getContainer()->set('entity_type.manager', $entity_type_manager);
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+
     $dependencies = $entity->calculateDependencies()->getDependencies();
     $this->assertEquals(['toolbar'], $dependencies['module']);
     $this->assertEquals(['bartik'], $dependencies['theme']);
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index ad9e49c616..05dc45b1a8 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -5,7 +5,11 @@
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Entity\EntityTypeRepositoryInterface;
 use Drupal\Core\Language\Language;
+use Drupal\entity_test\Entity\EntityTestMul;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -239,11 +243,11 @@ public function setupTestLoad() {
     // Base our mocked entity on a real entity class so we can test if calling
     // Entity::load() on the base class will bubble up to an actual entity.
     $this->entityTypeId = 'entity_test_mul';
-    $methods = get_class_methods('Drupal\entity_test\Entity\EntityTestMul');
+    $methods = get_class_methods(EntityTestMul::class);
     unset($methods[array_search('load', $methods)]);
     unset($methods[array_search('loadMultiple', $methods)]);
     unset($methods[array_search('create', $methods)]);
-    $this->entity = $this->getMockBuilder('Drupal\entity_test\Entity\EntityTestMul')
+    $this->entity = $this->getMockBuilder(EntityTestMul::class)
       ->disableOriginalConstructor()
       ->setMethods($methods)
       ->getMock();
@@ -260,21 +264,28 @@ public function testLoad() {
 
     $class_name = get_class($this->entity);
 
-    $this->entityManager->expects($this->once())
+    $entity_type_repository = $this->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
+    $entity_type_repository->expects($this->once())
       ->method('getEntityTypeFromClass')
       ->with($class_name)
       ->willReturn($this->entityTypeId);
 
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageInterface');
+    $storage = $this->getMock(EntityStorageInterface::class);
     $storage->expects($this->once())
       ->method('load')
       ->with(1)
       ->will($this->returnValue($this->entity));
-    $this->entityManager->expects($this->once())
+
+    $entity_type_manager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
+    $entity_type_manager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
 
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+    \Drupal::getContainer()->set('entity_type.manager', $entity_type_manager);
+    \Drupal::getContainer()->set('entity.manager', NULL);
+
     // Call Entity::load statically and check that it returns the mock entity.
     $this->assertSame($this->entity, $class_name::load(1));
   }
@@ -290,21 +301,28 @@ public function testLoadMultiple() {
 
     $class_name = get_class($this->entity);
 
-    $this->entityManager->expects($this->once())
+    $entity_type_repository = $this->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
+    $entity_type_repository->expects($this->once())
       ->method('getEntityTypeFromClass')
       ->with($class_name)
       ->willReturn($this->entityTypeId);
 
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageInterface');
+    $storage = $this->getMock(EntityStorageInterface::class);
     $storage->expects($this->once())
       ->method('loadMultiple')
       ->with([1])
       ->will($this->returnValue([1 => $this->entity]));
-    $this->entityManager->expects($this->once())
+
+    $entity_type_manager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
+    $entity_type_manager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
 
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+    \Drupal::getContainer()->set('entity_type.manager', $entity_type_manager);
+    \Drupal::getContainer()->set('entity.manager', NULL);
+
     // Call Entity::loadMultiple statically and check that it returns the mock
     // entity.
     $this->assertSame([1 => $this->entity], $class_name::loadMultiple([1]));
@@ -317,21 +335,29 @@ public function testCreate() {
     $this->setupTestLoad();
 
     $class_name = get_class($this->entity);
-    $this->entityManager->expects($this->once())
+
+    $entity_type_repository = $this->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
+    $entity_type_repository->expects($this->once())
       ->method('getEntityTypeFromClass')
       ->with($class_name)
       ->willReturn($this->entityTypeId);
 
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageInterface');
+    $storage = $this->getMock(EntityStorageInterface::class);
     $storage->expects($this->once())
       ->method('create')
       ->with([])
       ->will($this->returnValue($this->entity));
-    $this->entityManager->expects($this->once())
+
+    $entity_type_manager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
+    $entity_type_manager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
 
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+    \Drupal::getContainer()->set('entity_type.manager', $entity_type_manager);
+    \Drupal::getContainer()->set('entity.manager', NULL);
+
     // Call Entity::create() statically and check that it returns the mock
     // entity.
     $this->assertSame($this->entity, $class_name::create([]));
