diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php
index 95e85e21a4209b559d5fa56dc4cefbb2d1cfb2eb..4fe37866f13570c88807c7860a7f030e719ecbe9 100644
--- a/core/lib/Drupal/Core/Entity/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Entity.php
@@ -88,6 +88,15 @@ protected function entityTypeManager() {
     return \Drupal::entityTypeManager();
   }
 
+  /**
+   * Gets the entity type bundle info service.
+   *
+   * @return \Drupal\Core\Entity\EntityTypeBundleInfoInterface
+   */
+  protected function entityTypeBundleInfo() {
+    return \Drupal::service('entity_type.bundle.info');
+  }
+
   /**
    * Gets the language manager.
    *
@@ -198,7 +207,7 @@ public function toUrl($rel = 'canonical', array $options = []) {
       $bundle = $this->bundle();
       // A bundle-specific callback takes precedence over the generic one for
       // the entity type.
-      $bundles = $this->entityManager()->getBundleInfo($this->getEntityTypeId());
+      $bundles = $this->entityTypeBundleInfo()->getBundleInfo($this->getEntityTypeId());
       if (isset($bundles[$bundle]['uri_callback'])) {
         $uri_callback = $bundles[$bundle]['uri_callback'];
       }
@@ -344,11 +353,11 @@ public function uriRelationships() {
    */
   public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE) {
     if ($operation == 'create') {
-      return $this->entityManager()
+      return $this->entityTypeManager()
         ->getAccessControlHandler($this->entityTypeId)
         ->createAccess($this->bundle(), $account, [], $return_as_object);
     }
-    return $this->entityManager()
+    return $this->entityTypeManager()
       ->getAccessControlHandler($this->entityTypeId)
       ->access($this, $operation, $account, $return_as_object);
   }
@@ -374,7 +383,8 @@ public function language() {
    * {@inheritdoc}
    */
   public function save() {
-    return $this->entityManager()->getStorage($this->entityTypeId)->save($this);
+    $storage = $this->entityTypeManager()->getStorage($this->entityTypeId);
+    return $storage->save($this);
   }
 
   /**
@@ -382,7 +392,7 @@ public function save() {
    */
   public function delete() {
     if (!$this->isNew()) {
-      $this->entityManager()->getStorage($this->entityTypeId)->delete([$this->id() => $this]);
+      $this->entityTypeManager()->getStorage($this->entityTypeId)->delete([$this->id() => $this]);
     }
   }
 
@@ -407,7 +417,7 @@ public function createDuplicate() {
    * {@inheritdoc}
    */
   public function getEntityType() {
-    return $this->entityManager()->getDefinition($this->getEntityTypeId());
+    return $this->entityTypeManager()->getDefinition($this->getEntityTypeId());
   }
 
   /**
@@ -508,24 +518,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_type_repository = \Drupal::service('entity_type.repository');
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $storage = $entity_type_manager->getStorage($entity_type_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_type_repository = \Drupal::service('entity_type.repository');
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $storage = $entity_type_manager->getStorage($entity_type_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_type_repository = \Drupal::service('entity_type.repository');
+    $entity_type_manager = \Drupal::entityTypeManager();
+    $storage = $entity_type_manager->getStorage($entity_type_repository->getEntityTypeFromClass(get_called_class()));
+    return $storage->create($values);
   }
 
   /**
diff --git a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
index 8df0e93a2744340d543c15a8ee91789e01e74cde..921b5d2fbbf4ec6d815cb1706beb4abcf3d7a483 100644
--- a/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
+++ b/core/modules/block/tests/src/Unit/BlockConfigEntityUnitTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\block\Unit;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Tests\Core\Plugin\Fixtures\TestConfigurablePlugin;
 use Drupal\Tests\UnitTestCase;
 
@@ -20,11 +21,11 @@ class BlockConfigEntityUnitTest extends UnitTestCase {
   protected $entityType;
 
   /**
-   * The entity manager used for testing.
+   * The entity type manager used for testing.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The ID of the type of the entity under test.
@@ -51,8 +52,8 @@ protected function setUp() {
       ->method('getProvider')
       ->will($this->returnValue('block'));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -60,7 +61,7 @@ protected function setUp() {
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     \Drupal::setContainer($container);
   }
diff --git a/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php b/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php
index 4e96f4ac65139b46ad61243e56f4184b897f7235..e40e349a74253013aa7d2a0c8ae902af2c020749 100644
--- a/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php
+++ b/core/modules/editor/tests/src/Unit/EditorConfigEntityUnitTest.php
@@ -3,6 +3,8 @@
 namespace Drupal\Tests\editor\Unit;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\editor\Entity\Editor;
 use Drupal\Tests\UnitTestCase;
 
@@ -22,9 +24,9 @@ class EditorConfigEntityUnitTest extends UnitTestCase {
   /**
    * The entity manager used for testing.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The ID of the type of the entity under test.
@@ -66,8 +68,8 @@ protected function setUp() {
       ->method('getProvider')
       ->will($this->returnValue('editor'));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -78,10 +80,16 @@ protected function setUp() {
       ->disableOriginalConstructor()
       ->getMock();
 
+    $entity_manager = new EntityManager();
+
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    $container->set('entity.manager', $entity_manager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('plugin.manager.editor', $this->editorPluginManager);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager.
+    $entity_manager->setContainer($container);
     \Drupal::setContainer($container);
   }
 
@@ -120,7 +128,7 @@ public function testCalculateDependencies() {
       ->with($format_id)
       ->will($this->returnValue($filter_format));
 
-    $this->entityManager->expects($this->once())
+    $this->entityTypeManager->expects($this->once())
       ->method('getStorage')
       ->with('filter_format')
       ->will($this->returnValue($storage));
diff --git a/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php
index d1824cfcceeda7c9c86b694f75a467d26a8fd10c..b7dadf4926b11fccaaa9ea0ea17fa98362bd5cc0 100644
--- a/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php
+++ b/core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php
@@ -10,6 +10,9 @@
 use Drupal\Core\Entity\EntityType;
 use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\Tests\UnitTestCase;
 
@@ -33,6 +36,20 @@ class FieldConfigEntityUnitTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The entity type manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
+  /**
+   * The entity field manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityFieldManager;
+
   /**
    * The ID of the type of the entity under test.
    *
@@ -75,7 +92,9 @@ protected function setUp() {
     $this->entityTypeId = $this->randomMachineName();
     $this->entityType = $this->getMock('\Drupal\Core\Config\Entity\ConfigEntityTypeInterface');
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityManager = new EntityManager();
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityFieldManager = $this->getMock(EntityFieldManagerInterface::class);
 
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
@@ -85,9 +104,14 @@ protected function setUp() {
 
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_field.manager', $this->entityFieldManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('config.typed', $this->typedConfigManager);
     $container->set('plugin.manager.field.field_type', $this->fieldTypePluginManager);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager, etc.
+    $this->entityManager->setContainer($container);
     \Drupal::setContainer($container);
 
     // Create a mock FieldStorageConfig object.
@@ -102,7 +126,7 @@ protected function setUp() {
       ->method('getSettings')
       ->willReturn([]);
     // Place the field in the mocked entity manager's field registry.
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getFieldStorageDefinitions')
       ->with('test_entity_type')
       ->will($this->returnValue([
@@ -120,19 +144,19 @@ public function testCalculateDependencies() {
       ->method('getBundleConfigDependency')
       ->will($this->returnValue(['type' => 'config', 'name' => 'test.test_entity_type.id']));
 
-    $this->entityManager->expects($this->at(0))
+    $this->entityTypeManager->expects($this->at(0))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->willReturn($this->entityType);
-    $this->entityManager->expects($this->at(1))
+    $this->entityTypeManager->expects($this->at(1))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->willReturn($this->entityType);
-    $this->entityManager->expects($this->at(2))
+    $this->entityTypeManager->expects($this->at(2))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->willReturn($this->entityType);
-    $this->entityManager->expects($this->at(3))
+    $this->entityTypeManager->expects($this->at(3))
       ->method('getDefinition')
       ->with('test_entity_type')
       ->willReturn($target_entity_type);
@@ -168,7 +192,7 @@ public function testCalculateDependenciesIncorrectBundle() {
       ->with('test_bundle_not_exists')
       ->will($this->returnValue(NULL));
 
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getStorage')
       ->with('bundle_entity_type')
       ->will($this->returnValue($storage));
@@ -178,19 +202,19 @@ public function testCalculateDependenciesIncorrectBundle() {
       'bundle_entity_type' => 'bundle_entity_type',
     ]);
 
-    $this->entityManager->expects($this->at(0))
+    $this->entityTypeManager->expects($this->at(0))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->willReturn($this->entityType);
-    $this->entityManager->expects($this->at(1))
+    $this->entityTypeManager->expects($this->at(1))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->willReturn($this->entityType);
-    $this->entityManager->expects($this->at(2))
+    $this->entityTypeManager->expects($this->at(2))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->willReturn($this->entityType);
-    $this->entityManager->expects($this->at(3))
+    $this->entityTypeManager->expects($this->at(3))
       ->method('getDefinition')
       ->with('test_entity_type')
       ->willReturn($target_entity_type);
@@ -267,7 +291,7 @@ public function testToArray() {
       'dependencies' => [],
       'field_type' => 'test_field',
     ];
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -289,7 +313,7 @@ public function testToArray() {
   public function testGetType() {
     // Ensure that FieldConfig::getType() is not delegated to
     // FieldStorage.
-    $this->entityManager->expects($this->never())
+    $this->entityFieldManager->expects($this->never())
       ->method('getFieldStorageDefinitions');
     $this->fieldStorage->expects($this->never())
       ->method('getType');
diff --git a/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php b/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php
index 4ed751233305ebb7ddb107a3117d9d3c4549bc08..1d4701756322300e921cdb4976799e0fd2649d09 100644
--- a/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php
+++ b/core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php
@@ -6,8 +6,9 @@
 use Drupal\Core\Cache\Context\CacheContextsManager;
 use Drupal\Core\Config\Entity\ConfigEntityTypeInterface;
 use Drupal\Core\DependencyInjection\Container;
-use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\EntityManager;
 use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\field\Entity\FieldStorageConfig;
@@ -126,31 +127,37 @@ protected function setUp() {
     $storage_access_control_handler = new FieldStorageConfigAccessControlHandler($storageType);
     $storage_access_control_handler->setModuleHandler($this->moduleHandler);
 
-    $entityManager = $this->getMock(EntityManagerInterface::class);
-    $entityManager
+    $entity_type_manager = $this->getMock(EntityTypeManagerInterface::class);
+    $entity_type_manager
       ->expects($this->any())
       ->method('getDefinition')
       ->willReturnMap([
         ['field_storage_config', TRUE, $storageType],
         ['node', TRUE, $entityType],
       ]);
-    $entityManager
+    $entity_type_manager
       ->expects($this->any())
       ->method('getStorage')
       ->willReturnMap([
         ['field_storage_config', $this->getMock(EntityStorageInterface::class)],
       ]);
-    $entityManager
+    $entity_type_manager
       ->expects($this->any())
       ->method('getAccessControlHandler')
       ->willReturnMap([
         ['field_storage_config', $storage_access_control_handler],
       ]);
 
+    $entity_manager = new EntityManager();
+
     $container = new Container();
-    $container->set('entity.manager', $entityManager);
+    $container->set('entity.manager', $entity_manager);
+    $container->set('entity_type.manager', $entity_type_manager);
     $container->set('uuid', $this->getMock(UuidInterface::class));
     $container->set('cache_contexts_manager', $this->prophesize(CacheContextsManager::class));
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager.
+    $entity_manager->setContainer($container);
     \Drupal::setContainer($container);
 
     $this->fieldStorage = new FieldStorageConfig([
diff --git a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php
index 89b73963baa664b29dcad0ad40a2fc675ec2f949..970532a3e802d73637230932ae5bbe9e3443e57c 100644
--- a/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php
+++ b/core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php
@@ -8,6 +8,8 @@
 namespace Drupal\Tests\field\Unit;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\FieldException;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\Field\FieldTypePluginManagerInterface;
@@ -22,11 +24,11 @@
 class FieldStorageConfigEntityUnitTest extends UnitTestCase {
 
   /**
-   * The entity manager used for testing.
+   * The entity type manager used for testing.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The ID of the type of the entity under test.
@@ -53,14 +55,19 @@ class FieldStorageConfigEntityUnitTest extends UnitTestCase {
    * {@inheritdoc}
    */
   protected function setUp() {
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $entity_manager = new EntityManager();
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
     $this->fieldTypeManager = $this->getMock(FieldTypePluginManagerInterface::class);
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    $container->set('entity.manager', $entity_manager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('plugin.manager.field.field_type', $this->fieldTypeManager);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager.
+    $entity_manager->setContainer($container);
     \Drupal::setContainer($container);
   }
 
@@ -85,7 +92,7 @@ public function testCalculateDependencies() {
     // ConfigEntityBase::addDependency() to get the provider of the field config
     // entity type and once in FieldStorageConfig::calculateDependencies() to
     // get the provider of the entity type that field is attached to.
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->willReturnMap([
         ['field_storage_config', TRUE, $fieldStorageConfigentityType],
diff --git a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
index 06820d063180e158b33f3a24d7309f78c847b3ed..c3955df56a9e924ce78d1fece9037dfaa662ec0c 100644
--- a/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
+++ b/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
@@ -4,6 +4,9 @@
 
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Entity\EntityTypeRepositoryInterface;
 use Drupal\language\Entity\ContentLanguageSettings;
 use Drupal\Tests\UnitTestCase;
 
@@ -27,6 +30,13 @@ class ContentLanguageSettingsUnitTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The entity type manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
   /**
    * The ID of the type of the entity under test.
    *
@@ -62,7 +72,8 @@ protected function setUp() {
     $this->entityTypeId = $this->randomMachineName();
     $this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityManager = new EntityManager();
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
 
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
@@ -72,9 +83,13 @@ protected function setUp() {
 
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('config.typed', $this->typedConfigManager);
     $container->set('config.storage', $this->configEntityStorageInterface);
+    // Inject the container into entity.manager so it can defer to other entity
+    // services.
+    $this->entityManager->setContainer($container);
     \Drupal::setContainer($container);
   }
 
@@ -88,7 +103,7 @@ public function testCalculateDependencies() {
       ->method('getBundleConfigDependency')
       ->will($this->returnValue(['type' => 'config', 'name' => 'test.test_entity_type.id']));
 
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with('test_entity_type')
       ->will($this->returnValue($target_entity_type));
@@ -254,16 +269,20 @@ public function testLoadByEntityTypeBundle($config_id, ContentLanguageSettings $
       ->method('create')
       ->will($this->returnValue($nullConfig));
 
-    $this->entityManager
+    $this->entityTypeManager
       ->expects($this->any())
       ->method('getStorage')
       ->with('language_content_settings')
       ->will($this->returnValue($this->configEntityStorageInterface));
-    $this->entityManager->expects($this->any())
+
+    $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.repository', $entity_type_repository);
+
     $config = ContentLanguageSettings::loadByEntityTypeBundle($type, $bundle);
 
     $this->assertSame($expected_langcode, $config->getDefaultLangcode());
diff --git a/core/modules/rdf/tests/src/Unit/RdfMappingConfigEntityUnitTest.php b/core/modules/rdf/tests/src/Unit/RdfMappingConfigEntityUnitTest.php
index 5908ee72621ff4d1c98247ac4ba2c9a42d0a1f98..620dbcbb60d60631fb63a5dd6fb2b1e8742d8e91 100644
--- a/core/modules/rdf/tests/src/Unit/RdfMappingConfigEntityUnitTest.php
+++ b/core/modules/rdf/tests/src/Unit/RdfMappingConfigEntityUnitTest.php
@@ -3,6 +3,8 @@
 namespace Drupal\Tests\rdf\Unit;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Tests\UnitTestCase;
 use Drupal\rdf\Entity\RdfMapping;
 
@@ -26,6 +28,13 @@ class RdfMappingConfigEntityUnitTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The entity type manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
   /**
    * The ID of the type of the entity under test.
    *
@@ -51,13 +60,16 @@ protected function setUp() {
       ->method('getProvider')
       ->will($this->returnValue('entity'));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityManager = new EntityManager();
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
 
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
+    $this->entityManager->setContainer($container);
     \Drupal::setContainer($container);
 
   }
@@ -77,11 +89,11 @@ public function testCalculateDependencies() {
       ->method('getBundleEntityType')
       ->will($this->returnValue(NULL));
 
-    $this->entityManager->expects($this->at(0))
+    $this->entityTypeManager->expects($this->at(0))
       ->method('getDefinition')
       ->with($target_entity_type_id)
       ->will($this->returnValue($target_entity_type));
-    $this->entityManager->expects($this->at(1))
+    $this->entityTypeManager->expects($this->at(1))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -108,11 +120,11 @@ public function testCalculateDependenciesWithEntityBundle() {
       ->method('getBundleConfigDependency')
       ->will($this->returnValue(['type' => 'config', 'name' => 'test_module.type.' . $bundle_id]));
 
-    $this->entityManager->expects($this->at(0))
+    $this->entityTypeManager->expects($this->at(0))
       ->method('getDefinition')
       ->with($target_entity_type_id)
       ->will($this->returnValue($target_entity_type));
-    $this->entityManager->expects($this->at(1))
+    $this->entityTypeManager->expects($this->at(1))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
diff --git a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php
index bc9663dcf2603cb3483edf4fc076fe8449ea5760..0c64b05ed8575c8d226a417a80869715ed17e0e7 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;
 
@@ -20,11 +22,11 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
   protected $entityType;
 
   /**
-   * The entity manager used for testing.
+   * The entity type manager used for testing.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The breakpoint manager used for testing.
@@ -42,8 +44,8 @@ protected function setUp() {
       ->method('getProvider')
       ->will($this->returnValue('responsive_image'));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with('responsive_image_style')
       ->will($this->returnValue($this->entityType));
@@ -51,7 +53,7 @@ protected function setUp() {
     $this->breakpointManager = $this->getMock('\Drupal\breakpoint\BreakpointManagerInterface');
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('breakpoint.manager', $this->breakpointManager);
     \Drupal::setContainer($container);
   }
@@ -74,11 +76,14 @@ public function testCalculateDependencies() {
       ->method('loadMultiple')
       ->with(array_keys($styles))
       ->willReturn($styles);
-    $this->entityManager->expects($this->any())
+
+    $this->entityTypeManager->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 +108,8 @@ public function testCalculateDependencies() {
       ->with('test_group')
       ->willReturn(['bartik' => 'theme', 'toolbar' => 'module']);
 
+    \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/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php
index b8f28884260ce605683e3c063ad439e2c76d79b3..4e48fba0307955fb95999be43d5bb9b7ba28e06a 100644
--- a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php
+++ b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php
@@ -3,6 +3,8 @@
 namespace Drupal\Tests\user\Unit\Views\Argument;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Tests\UnitTestCase;
 use Drupal\user\Entity\Role;
 use Drupal\user\Plugin\views\argument\RolesRid;
@@ -44,23 +46,27 @@ public function testTitleQuery() {
       ->with('label')
       ->will($this->returnValue('label'));
 
-    $entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
-    $entity_manager->expects($this->any())
+    $entity_manager = new EntityManager();
+    $entity_type_manager = $this->getMock(EntityTypeManagerInterface::class);
+    $entity_type_manager->expects($this->any())
       ->method('getDefinition')
       ->with($this->equalTo('user_role'))
       ->will($this->returnValue($entity_type));
 
-    $entity_manager
+    $entity_type_manager
       ->expects($this->once())
       ->method('getStorage')
       ->with($this->equalTo('user_role'))
       ->will($this->returnValue($role_storage));
 
-    // @todo \Drupal\Core\Entity\Entity::entityType() uses a global call to
-    //   entity_get_info(), which in turn wraps \Drupal::entityManager(). Set
-    //   the entity manager until this is fixed.
+    // Set up a minimal container to satisfy Drupal\Core\Entity\Entity's
+    // dependency on it.
     $container = new ContainerBuilder();
     $container->set('entity.manager', $entity_manager);
+    $container->set('entity_type.manager', $entity_type_manager);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager.
+    $entity_manager->setContainer($container);
     \Drupal::setContainer($container);
 
     $roles_rid_argument = new RolesRid([], 'user__roles_rid', [], $entity_manager);
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
index 0a5d3d3e3824c6fb98af9e048a88625bc22828d6..0d417ab494040439366c67e99ef2e5ce53257673 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Plugin\PluginManagerInterface;
 use Drupal\Core\Config\Schema\SchemaIncompleteException;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Plugin\DefaultLazyPluginCollection;
 use Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginCollections;
@@ -37,11 +38,11 @@ class ConfigEntityBaseUnitTest extends UnitTestCase {
   protected $entityType;
 
   /**
-   * The entity manager used for testing.
+   * The entity type manager used for testing.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The ID of the type of the entity under test.
@@ -112,8 +113,8 @@ protected function setUp() {
       ->method('getConfigPrefix')
       ->willReturn('test_provider.' . $this->entityTypeId);
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -131,7 +132,7 @@ protected function setUp() {
     $this->typedConfigManager = $this->getMock('Drupal\Core\Config\TypedConfigManagerInterface');
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('language_manager', $this->languageManager);
     $container->set('cache_tags.invalidator', $this->cacheTagsInvalidator);
@@ -468,7 +469,7 @@ public function testCreateDuplicate() {
    * @covers ::sort
    */
   public function testSort() {
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue([
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
index 01dafab9255bf0ce0c2d61adeed278c0c70d5e13..3d86ecd11268d1f7ede06ff8975805630d5bc505 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@@ -17,8 +17,8 @@
 use Drupal\Core\Config\TypedConfigManagerInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityMalformedException;
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Entity\EntityStorageException;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\Query\QueryFactoryInterface;
 use Drupal\Core\Entity\Query\QueryInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -136,8 +136,8 @@ protected function setUp() {
     $this->entityStorage = new ConfigEntityStorage($entity_type, $this->configFactory->reveal(), $this->uuidService->reveal(), $this->languageManager->reveal());
     $this->entityStorage->setModuleHandler($this->moduleHandler->reveal());
 
-    $entity_manager = $this->prophesize(EntityManagerInterface::class);
-    $entity_manager->getDefinition('test_entity_type')->willReturn($entity_type);
+    $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
+    $entity_type_manager->getDefinition('test_entity_type')->willReturn($entity_type);
 
     $this->cacheTagsInvalidator = $this->prophesize(CacheTagsInvalidatorInterface::class);
 
@@ -149,7 +149,7 @@ protected function setUp() {
     $this->configManager = $this->prophesize(ConfigManagerInterface::class);
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $entity_manager->reveal());
+    $container->set('entity_type.manager', $entity_type_manager->reveal());
     $container->set('entity.query.config', $entity_query_factory->reveal());
     $container->set('config.typed', $typed_config_manager->reveal());
     $container->set('cache_tags.invalidator', $this->cacheTagsInvalidator->reveal());
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php
index 728fdca457fdcbe794ec86847b6c1da3c1adedfc..0f1ffc47eec233ab1c46daee9e119ea6737ef27f 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/EntityDisplayModeBaseUnitTest.php
@@ -3,6 +3,8 @@
 namespace Drupal\Tests\Core\Config\Entity;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -32,6 +34,13 @@ class EntityDisplayModeBaseUnitTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The entity type manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
   /**
    * The ID of the type of the entity under test.
    *
@@ -57,13 +66,21 @@ protected function setUp() {
       ->method('getProvider')
       ->will($this->returnValue('entity'));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+
+    $this->entityManager = new EntityManager();
 
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
+
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager.
+    $this->entityManager->setContainer($container);
+
     \Drupal::setContainer($container);
   }
 
@@ -79,11 +96,11 @@ public function testCalculateDependencies() {
       ->will($this->returnValue('test_module'));
     $values = ['targetEntityType' => $target_entity_type_id];
 
-    $this->entityManager->expects($this->at(0))
+    $this->entityTypeManager->expects($this->at(0))
       ->method('getDefinition')
       ->with($target_entity_type_id)
       ->will($this->returnValue($target_entity_type));
-    $this->entityManager->expects($this->at(1))
+    $this->entityTypeManager->expects($this->at(1))
       ->method('getDefinition')
       ->with($this->entityType)
       ->will($this->returnValue($this->entityInfo));
diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
index 541ec88e2a42534f3baa0d8a55503f6ad5dd3700..0d56516dd231ad80d62c040bb6b84fd967271a55 100644
--- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
@@ -4,7 +4,12 @@
 
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\ContentEntityBase;
 use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\TypedData\TypedDataManagerInterface;
@@ -54,6 +59,27 @@ class ContentEntityBaseUnitTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The entity field manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityFieldManager;
+
+  /**
+   * The entity type bundle manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeBundleInfo;
+
+  /**
+   * The entity type manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
   /**
    * The type ID of the entity under test.
    *
@@ -124,12 +150,18 @@ protected function setUp() {
         'uuid' => 'uuid',
     ]));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityManager = new EntityManager();
+
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
 
+    $this->entityFieldManager = $this->getMock(EntityFieldManagerInterface::class);
+
+    $this->entityTypeBundleInfo = $this->getMock(EntityTypeBundleInfoInterface::class);
+
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
     $this->typedDataManager = $this->getMock(TypedDataManagerInterface::class);
@@ -168,10 +200,16 @@ protected function setUp() {
 
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_field.manager', $this->entityFieldManager);
+    $container->set('entity_type.bundle.info', $this->entityTypeBundleInfo);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('typed_data_manager', $this->typedDataManager);
     $container->set('language_manager', $this->languageManager);
     $container->set('plugin.manager.field.field_type', $this->fieldTypePluginManager);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager and other services.
+    $this->entityManager->setContainer($container);
     \Drupal::setContainer($container);
 
     $this->fieldDefinitions = [
@@ -179,14 +217,14 @@ protected function setUp() {
       'revision_id' => BaseFieldDefinition::create('integer'),
     ];
 
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getFieldDefinitions')
       ->with($this->entityTypeId, $this->bundle)
       ->will($this->returnValue($this->fieldDefinitions));
 
-    $this->entity = $this->getMockForAbstractClass('\Drupal\Core\Entity\ContentEntityBase', [$values, $this->entityTypeId, $this->bundle], '', TRUE, TRUE, TRUE, ['isNew']);
+    $this->entity = $this->getMockForAbstractClass(ContentEntityBase::class, [$values, $this->entityTypeId, $this->bundle], '', TRUE, TRUE, TRUE, ['isNew']);
     $values['defaultLangcode'] = [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED];
-    $this->entityUnd = $this->getMockForAbstractClass('\Drupal\Core\Entity\ContentEntityBase', [$values, $this->entityTypeId, $this->bundle]);
+    $this->entityUnd = $this->getMockForAbstractClass(ContentEntityBase::class, [$values, $this->entityTypeId, $this->bundle]);
   }
 
   /**
@@ -283,7 +321,7 @@ public function testGetRevisionId() {
    * @covers ::isTranslatable
    */
   public function testIsTranslatable() {
-    $this->entityManager->expects($this->any())
+    $this->entityTypeBundleInfo->expects($this->any())
       ->method('getBundleInfo')
       ->with($this->entityTypeId)
       ->will($this->returnValue([
@@ -382,7 +420,7 @@ public function testRequiredValidation() {
         $entity->preSave($storage);
       });
 
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
@@ -434,7 +472,7 @@ public function testAccess() {
     $access->expects($this->at(3))
       ->method('createAccess')
       ->will($this->returnValue(AccessResult::allowed()));
-    $this->entityManager->expects($this->exactly(4))
+    $this->entityTypeManager->expects($this->exactly(4))
       ->method('getAccessControlHandler')
       ->will($this->returnValue($access));
     $this->assertTrue($this->entity->access($operation));
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php
index 60bd4254bc36411589f48cb5d6717930167707da..38e9502e99a3f36b78f9f0b4a88cd1ffdb78d9b2 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\Core\Entity;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Link;
 use Drupal\Tests\UnitTestCase;
@@ -14,11 +15,11 @@
 class EntityLinkTest extends UnitTestCase {
 
   /**
-   * The mocked entity manager.
+   * The mocked entity type manager.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The tested link generator.
@@ -40,12 +41,12 @@ class EntityLinkTest extends UnitTestCase {
   protected function setUp() {
     parent::setUp();
 
-    $this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
     $this->linkGenerator = $this->getMock('Drupal\Core\Utility\LinkGeneratorInterface');
     $this->languageManager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface');
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('link_generator', $this->linkGenerator);
     $container->set('language_manager', $this->languageManager);
     \Drupal::setContainer($container);
@@ -86,7 +87,7 @@ public function testLink($entity_label, $link_text, $expected_text, $link_rel =
         ['langcode', 'langcode'],
       ]);
 
-    $this->entityManager
+    $this->entityTypeManager
       ->expects($this->any())
       ->method('getDefinition')
       ->with($entity_type_id)
@@ -148,7 +149,7 @@ public function testToLink($entity_label, $link_text, $expected_text, $link_rel
         ['langcode', 'langcode'],
       ]);
 
-    $this->entityManager
+    $this->entityTypeManager
       ->expects($this->any())
       ->method('getDefinition')
       ->with($entity_type_id)
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
index ad9e49c61675d236ace39748177cb80184cb16b6..1acb20c4e61e83580e7d83ce3f95c61eb8c6944a 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;
 
 /**
@@ -30,11 +34,11 @@ class EntityUnitTest extends UnitTestCase {
   protected $entityType;
 
   /**
-   * The entity manager used for testing.
+   * The entity type manager used for testing.
    *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
-  protected $entityManager;
+  protected $entityTypeManager;
 
   /**
    * The ID of the type of the entity under test.
@@ -94,8 +98,8 @@ protected function setUp() {
       ->method('getListCacheTags')
       ->willReturn([$this->entityTypeId . '_list']);
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager = $this->getMockForAbstractClass(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -111,7 +115,9 @@ protected function setUp() {
     $this->cacheTagsInvalidator = $this->getMock('Drupal\Core\Cache\CacheTagsInvalidator');
 
     $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
+    // Ensure that Entity doesn't use the deprecated entity.manager service.
+    $container->set('entity.manager', NULL);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('uuid', $this->uuid);
     $container->set('language_manager', $this->languageManager);
     $container->set('cache_tags.invalidator', $this->cacheTagsInvalidator);
@@ -186,7 +192,7 @@ public function testLabel() {
 
     // Set a dummy property on the entity under test to test that the label can
     // be returned form a property if there is no callback.
-    $this->entityManager->expects($this->at(1))
+    $this->entityTypeManager->expects($this->at(1))
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue([
@@ -213,9 +219,10 @@ public function testAccess() {
     $access->expects($this->at(1))
       ->method('createAccess')
       ->will($this->returnValue(AccessResult::allowed()));
-    $this->entityManager->expects($this->exactly(2))
+    $this->entityTypeManager->expects($this->exactly(2))
       ->method('getAccessControlHandler')
       ->will($this->returnValue($access));
+
     $this->assertEquals(AccessResult::allowed(), $this->entity->access($operation));
     $this->assertEquals(AccessResult::allowed(), $this->entity->access('create'));
   }
@@ -239,11 +246,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 +267,25 @@ 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())
+
+    $this->entityTypeManager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
 
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+
     // Call Entity::load statically and check that it returns the mock entity.
     $this->assertSame($this->entity, $class_name::load(1));
   }
@@ -290,21 +301,25 @@ 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())
+
+    $this->entityTypeManager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
 
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+
     // Call Entity::loadMultiple statically and check that it returns the mock
     // entity.
     $this->assertSame([1 => $this->entity], $class_name::loadMultiple([1]));
@@ -317,21 +332,26 @@ 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())
+
+    $this->entityTypeManager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
 
+    \Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
+
     // Call Entity::create() statically and check that it returns the mock
     // entity.
     $this->assertSame($this->entity, $class_name::create([]));
@@ -345,10 +365,12 @@ public function testSave() {
     $storage->expects($this->once())
       ->method('save')
       ->with($this->entity);
-    $this->entityManager->expects($this->once())
+
+    $this->entityTypeManager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
+
     $this->entity->save();
   }
 
@@ -361,10 +383,12 @@ public function testDelete() {
     // Testing the argument of the delete() method consumes too much memory.
     $storage->expects($this->once())
       ->method('delete');
-    $this->entityManager->expects($this->once())
+
+    $this->entityTypeManager->expects($this->once())
       ->method('getStorage')
       ->with($this->entityTypeId)
       ->will($this->returnValue($storage));
+
     $this->entity->delete();
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
index ebde776a69b62d4d78df9b585d3682b032787202..1e9ee7c169f45c8ae5999d336161e2fad02e0578 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Entity\Entity;
 use Drupal\Core\Entity\EntityMalformedException;
-use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\Exception\UndefinedLinkTemplateException;
 use Drupal\Core\Entity\RevisionableInterface;
@@ -21,11 +21,11 @@
 class EntityUrlTest extends UnitTestCase {
 
   /**
-   * The entity manager mock used in this test.
+   * The entity type bundle info service mock used in this test.
    *
-   * @var \Prophecy\Prophecy\ProphecyInterface|\Drupal\Core\Entity\EntityManagerInterface
+   * @var \Prophecy\Prophecy\ProphecyInterface|\Drupal\Core\Entity\EntityTypeBundleInfoInterface
    */
-  protected $entityManager;
+  protected $entityTypeBundleInfo;
 
   /**
    * The ID of the entity type used in this test.
@@ -511,7 +511,7 @@ public function providerTestUrl() {
    * @return \Drupal\Core\Entity\Entity|\PHPUnit_Framework_MockObject_MockObject
    */
   protected function getEntity($class, array $values, array $methods = []) {
-    $methods = array_merge($methods, ['getEntityType', 'entityManager']);
+    $methods = array_merge($methods, ['getEntityType', 'entityManager', 'entityTypeBundleInfo']);
 
     // Prophecy does not allow prophesizing abstract classes while actually
     // calling their code. We use Prophecy below because that allows us to
@@ -526,8 +526,8 @@ protected function getEntity($class, array $values, array $methods = []) {
     $this->entityType->getKey('langcode')->willReturn(FALSE);
     $entity->method('getEntityType')->willReturn($this->entityType->reveal());
 
-    $this->entityManager = $this->prophesize(EntityManagerInterface::class);
-    $entity->method('entityManager')->willReturn($this->entityManager->reveal());
+    $this->entityTypeBundleInfo = $this->prophesize(EntityTypeBundleInfoInterface::class);
+    $entity->method('entityTypeBundleInfo')->willReturn($this->entityTypeBundleInfo->reveal());
 
     return $entity;
   }
@@ -581,7 +581,7 @@ protected function registerLinkTemplate($link_template) {
    *   The bundle information to register.
    */
   protected function registerBundleInfo($bundle_info) {
-    $this->entityManager
+    $this->entityTypeBundleInfo
       ->getBundleInfo($this->entityTypeId)
       ->willReturn([$this->entityTypeId => $bundle_info])
     ;
diff --git a/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php
index 6f20444a77bc9055f4f9174dd3daf2352f893ad9..4a2dac5653e00c1e4761f755ef116443a9427956 100644
--- a/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php
@@ -4,9 +4,12 @@
 
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityMalformedException;
+use Drupal\Core\Entity\EntityManager;
 use Drupal\Core\Entity\EntityStorageException;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Tests\UnitTestCase;
 use Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage;
@@ -58,12 +61,26 @@ class KeyValueEntityStorageTest extends UnitTestCase {
   protected $entityStorage;
 
   /**
-   * The mocked entity manager.
+   * The entity manager.
    *
    * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
   protected $entityManager;
 
+  /**
+   * The mocked entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
+  /**
+   * The mocked entity field manager.
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityFieldManager;
+
   /**
    * The mocked cache tags invalidator.
    *
@@ -102,12 +119,16 @@ protected function setUpKeyValueEntityStorage($uuid_key = 'uuid') {
       ->method('getListCacheTags')
       ->willReturn(['test_entity_type_list']);
 
-    $this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityManager = new EntityManager();
+
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with('test_entity_type')
       ->will($this->returnValue($this->entityType));
 
+    $this->entityFieldManager = $this->getMock(EntityFieldManagerInterface::class);
+
     $this->cacheTagsInvalidator = $this->getMock('Drupal\Core\Cache\CacheTagsInvalidatorInterface');
 
     $this->keyValueStore = $this->getMock('Drupal\Core\KeyValueStore\KeyValueStoreInterface');
@@ -127,8 +148,13 @@ protected function setUpKeyValueEntityStorage($uuid_key = 'uuid') {
 
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_field.manager', $this->entityFieldManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
     $container->set('language_manager', $this->languageManager);
     $container->set('cache_tags.invalidator', $this->cacheTagsInvalidator);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager and other services.
+    $this->entityManager->setContainer($container);
     \Drupal::setContainer($container);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
index 98f5718c8380fe47c355dae224804a65da12ed60..bf3fd46eb6a331eba92983524c95fc809eee4103 100644
--- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
@@ -8,8 +8,11 @@
 namespace Drupal\Tests\Core\Entity\Sql;
 
 use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Entity\EntityManager;
 use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\Query\QueryFactoryInterface;
 use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
 use Drupal\Core\Language\Language;
@@ -50,6 +53,20 @@ class SqlContentEntityStorageTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The mocked entity type manager used in this test.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
+  /**
+   * The mocked entity field manager used in this test.
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityFieldManager;
+
   /**
    * The entity type ID.
    *
@@ -104,7 +121,12 @@ protected function setUp() {
     $this->container = new ContainerBuilder();
     \Drupal::setContainer($this->container);
 
-    $this->entityManager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityManager = new EntityManager();
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager and other services.
+    $this->entityManager->setContainer($this->container);
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityFieldManager = $this->getMock(EntityFieldManagerInterface::class);
     $this->moduleHandler = $this->getMock('Drupal\Core\Extension\ModuleHandlerInterface');
     $this->cache = $this->getMock('Drupal\Core\Cache\CacheBackendInterface');
     $this->languageManager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface');
@@ -114,6 +136,10 @@ protected function setUp() {
     $this->connection = $this->getMockBuilder('Drupal\Core\Database\Connection')
       ->disableOriginalConstructor()
       ->getMock();
+
+    $this->container->set('entity.manager', $this->entityManager);
+    $this->container->set('entity_type.manager', $this->entityTypeManager);
+    $this->container->set('entity_field.manager', $this->entityFieldManager);
   }
 
   /**
@@ -986,7 +1012,6 @@ public function testCreate() {
       ->will($this->returnValue($language));
 
     $this->container->set('language_manager', $language_manager);
-    $this->container->set('entity.manager', $this->entityManager);
     $this->container->set('module_handler', $this->moduleHandler);
 
     $entity = $this->getMockBuilder('Drupal\Core\Entity\ContentEntityBase')
@@ -1006,14 +1031,14 @@ public function testCreate() {
 
     // ContentEntityStorageBase iterates over the entity which calls this method
     // internally in ContentEntityBase::getProperties().
-    $this->entityManager->expects($this->once())
+    $this->entityFieldManager->expects($this->once())
       ->method('getFieldDefinitions')
       ->will($this->returnValue([]));
 
     $this->entityType->expects($this->atLeastOnce())
       ->method('isRevisionable')
       ->will($this->returnValue(FALSE));
-    $this->entityManager->expects($this->atLeastOnce())
+    $this->entityTypeManager->expects($this->atLeastOnce())
       ->method('getDefinition')
       ->with($this->entityType->id())
       ->will($this->returnValue($this->entityType));
@@ -1077,15 +1102,15 @@ protected function setUpEntityStorage() {
       ->disableOriginalConstructor()
       ->getMock();
 
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->will($this->returnValue($this->entityType));
 
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getFieldStorageDefinitions')
       ->will($this->returnValue($this->fieldDefinitions));
 
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getBaseFieldDefinitions')
       ->will($this->returnValue($this->fieldDefinitions));
 
@@ -1259,15 +1284,15 @@ public function testHasData() {
       ->disableOriginalConstructor()
       ->getMock();
 
-    $this->entityManager->expects($this->any())
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->will($this->returnValue($this->entityType));
 
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getFieldStorageDefinitions')
       ->will($this->returnValue($this->fieldDefinitions));
 
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getBaseFieldDefinitions')
       ->will($this->returnValue($this->fieldDefinitions));
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
index 2140112f513146dd0756d4a443b4b9f69f7b5d67..d932993cfaadbf1a839f3fc647e67f8e1383c9f3 100644
--- a/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php
@@ -3,6 +3,9 @@
 namespace Drupal\Tests\Core\Entity\TypedData;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
+use Drupal\Core\Entity\EntityManager;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\Plugin\DataType\EntityAdapter;
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\Language\LanguageInterface;
@@ -53,6 +56,19 @@ class EntityAdapterUnitTest extends UnitTestCase {
    */
   protected $entityManager;
 
+  /**
+   * The entity type manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityTypeManager;
+
+  /**
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityFieldManager;
+
   /**
    * The type ID of the entity under test.
    *
@@ -130,8 +146,10 @@ protected function setUp() {
         'uuid' => 'uuid',
     ]));
 
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
+    $this->entityManager = new EntityManager();
+
+    $this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
+    $this->entityTypeManager->expects($this->any())
       ->method('getDefinition')
       ->with($this->entityTypeId)
       ->will($this->returnValue($this->entityType));
@@ -183,23 +201,30 @@ protected function setUp() {
       ->method('createFieldItemList')
       ->willReturn($this->fieldItemList);
 
+    $this->entityFieldManager = $this->getMockForAbstractClass(EntityFieldManagerInterface::class);
+
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
+    $container->set('entity_type.manager', $this->entityTypeManager);
+    $container->set('entity_field.manager', $this->entityFieldManager);
     $container->set('uuid', $this->uuid);
     $container->set('typed_data_manager', $this->typedDataManager);
     $container->set('language_manager', $this->languageManager);
     $container->set('plugin.manager.field.field_type', $this->fieldTypePluginManager);
+    // Inject the container into entity.manager so it can defer to
+    // entity_type.manager and other services.
+    $this->entityManager->setContainer($container);
     \Drupal::setContainer($container);
 
     $this->fieldDefinitions = [
       'id' => BaseFieldDefinition::create('integer'),
       'revision_id' => BaseFieldDefinition::create('integer'),
     ];
-
-    $this->entityManager->expects($this->any())
+    $this->entityFieldManager->expects($this->any())
       ->method('getFieldDefinitions')
       ->with($this->entityTypeId, $this->bundle)
       ->will($this->returnValue($this->fieldDefinitions));
+
     $this->entity = $this->getMockForAbstractClass('\Drupal\Core\Entity\ContentEntityBase', [$values, $this->entityTypeId, $this->bundle]);
 
     $this->entityAdapter = EntityAdapter::createFromEntity($this->entity);