diff --git a/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php b/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php
index 7f7b7ef8cd..938752ad4d 100644
--- a/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php
+++ b/core/modules/action/tests/src/Kernel/Plugin/migrate/source/ActionTest.php
@@ -15,7 +15,7 @@ class ActionTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['action', 'migrate_drupal'];
+  public static $modules = ['action', 'migrate_drupal', 'system'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php
index feece1f7bc..f8a362eef2 100644
--- a/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php
+++ b/core/modules/book/tests/src/Kernel/Plugin/migrate/source/d6/BookTest.php
@@ -13,7 +13,7 @@ class BookTest extends MigrateSqlSourceTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['book', 'migrate_drupal'];
+  public static $modules = ['user', 'node', 'book', 'migrate_drupal'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/ContentEntity.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/ContentEntity.php
new file mode 100644
index 0000000000..b9826be3ed
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/ContentEntity.php
@@ -0,0 +1,230 @@
+<?php
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d8;
+
+use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
+use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\Core\Entity\EntityFieldManagerInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\migrate\Plugin\migrate\source\SourcePluginBase;
+use Drupal\migrate\Plugin\MigrationInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * Drupal content entity source from database.
+ *
+ * @MigrateSource(
+ *   id = "entity",
+ *   source_provider = "migrate_drupal",
+ *   deriver = "\Drupal\migrate_drupal\Plugin\migrate\source\d8\ContentEntityDeriver",
+ * )
+ */
+class ContentEntity extends SourcePluginBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * The entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
+   * The entity field manager.
+   *
+   * @var \Drupal\Core\Entity\EntityFieldManagerInterface
+   */
+  protected $entityFieldManager;
+
+  /**
+   * Static cache for bundle fields.
+   *
+   * @var array
+   */
+  protected $bundleFields = [];
+
+  /**
+   * The entity type.
+   *
+   * @var string
+   */
+  protected $entityType;
+
+  /**
+   * The entity key for a bundle or FALSE if not configured.
+   *
+   * @var bool|string
+   */
+  protected $bundleKey;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager) {
+    if (empty($plugin_definition['entity_type'])) {
+      throw new InvalidPluginDefinitionException($plugin_id, 'Missing required entity_type definition');
+    }
+    $this->entityTypeManager = $entity_type_manager;
+    $this->entityFieldManager = $entity_field_manager;
+    $this->entityType = $plugin_definition['entity_type'];
+    $entityDefinition = $this->entityTypeManager->getDefinition($this->entityType);
+    $this->bundleKey = $entityDefinition->getKey('bundle');
+    if (!empty($this->configuration['bundle'])) {
+      if (!$this->bundleKey) {
+        throw new InvalidPluginDefinitionException('A bundle was provided but entity is not bundleable.');
+      }
+    }
+    parent::__construct($configuration + ['bundle' => NULL], $plugin_id, $plugin_definition, $migration);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $migration,
+      $container->get('entity_type.manager'),
+      $container->get('entity_field.manager')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __toString() {
+    return $this->entityType;
+  }
+
+  /**
+   * Initializes the iterator with the source data.
+   *
+   * @return \Generator
+   *   An generator of the data for this source.
+   */
+  protected function initializeIterator() {
+    $ids = $this->query()->execute();
+    return $this->yield($ids);
+  }
+
+  /**
+   * Loads and yields a single entity one at a time.
+   *
+   * @param array $ids
+   *   The entity IDs.
+   *
+   * @return \Generator
+   *   And iterable of loaded entities.
+   */
+  protected function yield(array $ids) {
+    $storage = $this->entityTypeManager->getStorage($this->entityType);
+    foreach ($ids as $id) {
+      /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
+      $entity = $storage->load($id);
+      yield $this->toArray($entity);
+      foreach ($entity->getTranslationLanguages(FALSE) as $language) {
+        yield $this->toArray($entity->getTranslation($language->getId()));
+      }
+    }
+  }
+
+  /**
+   * Convert entity to array.
+   *
+   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
+   *   The entity to convert.
+   *
+   * @return array
+   *   The entity converted to array.
+   */
+  protected function toArray(ContentEntityInterface $entity) {
+    $return = [];
+    foreach ($entity->toArray() as $field => $values) {
+      $return[$field] = $values;
+    }
+    // The ids must be flat, they cannot be nested for the id map.
+    foreach (array_keys($this->getIds()) as $id) {
+      $reset = reset($return[$id]);
+      $return[$id] = reset($reset);
+    }
+    return $return;
+  }
+
+  /**
+   * Query to retrieve entities.
+   *
+   * @return \Drupal\Core\Entity\Query\QueryInterface
+   */
+  public function query() {
+    $query = $this->entityTypeManager
+      ->getStorage($this->entityType)
+      ->getQuery();
+    if (!empty($this->configuration['bundle'])) {
+      $query->condition($this->bundleKey, $this->configuration['bundle']);
+    }
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function doCount() {
+    return $this->query()->count()->execute();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    $field_definitions = $this->entityFieldManager->getBaseFieldDefinitions($this->entityType);
+    $fields = [];
+    foreach ($field_definitions as $field_name => $definition) {
+      $fields[$field_name] = (string) $definition->getLabel();
+    }
+    if (!empty($this->configuration['bundle'])) {
+      foreach ($this->entityFieldManager->getFieldDefinitions($this->entityType, $this->configuration['bundle']) as $field_name => $definition) {
+        $fields[$field_name] = (string) $definition->getLabel();
+      }
+    }
+    return $fields;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $entity_definition = $this->entityTypeManager->getDefinition($this->entityType);
+    $idKey = $entity_definition->getKey('id');
+    $ids[$idKey] = $this->getDefinitionFromEntity($idKey);
+    if ($entity_definition->isTranslatable()) {
+      $langcode_key = $entity_definition->getKey('langcode');
+      $ids[$langcode_key] = $this->getDefinitionFromEntity($langcode_key);
+    }
+    return $ids;
+  }
+
+  /**
+   * Gets the field definition from a specific entity base field.
+   *
+   * @param string $key
+   *   The field ID key.
+   *
+   * @return array
+   *   An associative array with a structure that contains the field type, keyed
+   *   as 'type', together with field storage settings as they are returned by
+   *   FieldStorageDefinitionInterface::getSettings().
+   *
+   * @see \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::getDefinitionFromEntity()
+   */
+  protected function getDefinitionFromEntity($key) {
+    /** @var \Drupal\Core\Field\FieldDefinitionInterface $field_definition */
+    $field_definition = $this->entityFieldManager->getBaseFieldDefinitions($this->entityType)[$key];
+    return [
+      'alias' => 'b',
+      'type' => $field_definition->getType(),
+    ] + $field_definition->getSettings();
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/ContentEntityDeriver.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/ContentEntityDeriver.php
new file mode 100644
index 0000000000..33052bedfa
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/ContentEntityDeriver.php
@@ -0,0 +1,59 @@
+<?php
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d8;
+
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Entity\ContentEntityTypeInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+class ContentEntityDeriver extends DeriverBase implements ContainerDeriverInterface {
+
+  /**
+   * The entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
+   * Constructs a new ContentEntityDeriver.
+   *
+   * @param string $base_plugin_id
+   *   The base plugin ID for the plugin ID.
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
+   *   The entity type manager.
+   */
+  public function __construct($base_plugin_id, EntityTypeManagerInterface $entityTypeManager) {
+    $this->entityTypeManager = $entityTypeManager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, $base_plugin_id) {
+    // Translations don't make sense unless we have content_translation.
+    return new static(
+      $base_plugin_id,
+      $container->get('entity_type.manager')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDerivativeDefinitions($base_plugin_definition) {
+    $this->derivatives = [];
+    foreach ($this->entityTypeManager->getDefinitions() as $id => $definition) {
+      // The source plugin only supports entities that are a content entity.
+      if ($definition instanceof ContentEntityTypeInterface) {
+        $this->derivatives[$id] = $base_plugin_definition;
+        // Provide this so the source can be used separate from a deriver.
+        $this->derivatives[$id]['entity_type'] = $id;
+      }
+    }
+    return parent::getDerivativeDefinitions($base_plugin_definition);
+  }
+
+}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ContentEntityTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ContentEntityTest.php
new file mode 100755
index 0000000000..c096f72892
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ContentEntityTest.php
@@ -0,0 +1,375 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8;
+
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+use Drupal\Core\Language\LanguageInterface;
+use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
+use Drupal\file\Entity\File;
+use Drupal\language\Entity\ConfigurableLanguage;
+use Drupal\media\Entity\Media;
+use Drupal\media\Entity\MediaType;
+use Drupal\migrate\Plugin\MigrateIdMapInterface;
+use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\node\Entity\Node;
+use Drupal\node\Entity\NodeType;
+use Drupal\taxonomy\Entity\Term;
+use Drupal\taxonomy\Entity\Vocabulary;
+use Drupal\Tests\migrate\Kernel\MigrateTestBase;
+use Drupal\user\Entity\User;
+
+/**
+ * Tests the entity content source plugin.
+ *
+ * @group migrate_drupal_8
+ */
+class ContentEntityTest extends MigrateTestBase {
+
+  use EntityReferenceTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'user',
+    'migrate',
+    'migrate_drupal',
+    'system',
+    'node',
+    'taxonomy',
+    'field',
+    'file',
+    'image',
+    'media',
+    'media_test_source',
+    'text',
+    'filter',
+    'language',
+    'content_translation',
+  ];
+
+  /**
+   * The bundle used in this test.
+   *
+   * @var string
+   */
+  protected $bundle = 'article';
+
+  /**
+   * The name of the field used in this test.
+   *
+   * @var string
+   */
+  protected $fieldName = 'field_entity_reference';
+
+  /**
+   * The vocabulary id.
+   *
+   * @var string
+   */
+  protected $vocabulary = 'fruit';
+
+  /**
+   * The test user.
+   *
+   * @var \Drupal\user\Entity\User
+   */
+  protected $user;
+
+  /**
+   * The mock migration plugin.
+   *
+   * @var \PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $migration;
+
+  /**
+   * The source plugin manager.
+   *
+   * @var \Drupal\migrate\Plugin\MigrateSourcePluginManager
+   */
+  protected $sourcePluginManager;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->installEntitySchema('node');
+    $this->installEntitySchema('file');
+    $this->installEntitySchema('media');
+    $this->installEntitySchema('taxonomy_term');
+    $this->installEntitySchema('taxonomy_vocabulary');
+    $this->installEntitySchema('user');
+    $this->installSchema('system', ['sequences']);
+    $this->installSchema('user', 'users_data');
+    $this->installSchema('file', 'file_usage');
+    $this->installSchema('node', ['node_access']);
+    $this->installConfig($this->modules);
+
+    ConfigurableLanguage::createFromLangcode('fr')->save();
+
+    // Create article content type.
+    $nodeType = NodeType::create(['type' => $this->bundle, 'name' => 'Article']);
+    $nodeType->save();
+
+    // Create a vocabulary.
+    $vocabulary = Vocabulary::create([
+      'name' => $this->vocabulary,
+      'description' => $this->vocabulary,
+      'vid' => $this->vocabulary,
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+    ]);
+    $vocabulary->save();
+
+    // Create a term reference field on node.
+    $this->createEntityReferenceField(
+      'node',
+      $this->bundle,
+      $this->fieldName,
+      'Term reference',
+      'taxonomy_term',
+      'default',
+      ['target_bundles' => [$this->vocabulary]],
+      FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED
+    );
+    // Create a term reference field on user.
+    $this->createEntityReferenceField(
+      'user',
+      'user',
+      $this->fieldName,
+      'Term reference',
+      'taxonomy_term',
+      'default',
+      ['target_bundles' => [$this->vocabulary]],
+      FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED
+    );
+
+    // Create some data.
+    $this->user = User::create([
+      'name' => 'user123',
+      'uid' => 1,
+      'mail' => 'example@example.com',
+    ]);
+    $this->user->save();
+
+    $term = Term::create([
+      'vid' => $this->vocabulary,
+      'name' => 'Apples',
+      'uid' => $this->user->id(),
+    ]);
+    $term->save();
+    $this->user->set($this->fieldName, $term->id());
+    $this->user->save();
+    $node = Node::create([
+      'type' => $this->bundle,
+      'title' => 'Apples',
+      $this->fieldName => $term->id(),
+      'uid' => $this->user->id(),
+    ]);
+    $node->save();
+    $node->addTranslation('fr', [
+      'title' => 'Pommes',
+      $this->fieldName => $term->id(),
+    ])->save();
+
+    $this->sourcePluginManager = $this->container->get('plugin.manager.migrate.source');
+    $this->migration = $this->createMock(MigrationInterface::class);
+    $idMap = $this->createMock(MigrateIdMapInterface::class);
+    $idMap->expects(self::any())->method('getRowBySource')->willReturn(NULL);
+    $this->migration->expects(self::any())->method('getIdMap')->willReturn($idMap);
+  }
+
+  /**
+   * Tests user source plugin.
+   */
+  public function testUserSource() {
+    $userSource = $this->sourcePluginManager->createInstance('entity:user', [], $this->migration);
+    $this->migration->expects(self::once())->method('getSourcePlugin')->willReturn($userSource);
+    $this->migration->expects(self::once())->method('getDestinationIds')->willReturn([1]);
+    $ids = $userSource->getIds();
+    $this->assertArrayHasKey('langcode', $ids);
+    $this->assertArrayHasKey('uid', $ids);
+    $fields = $userSource->fields();
+    $this->assertArrayHasKey('name', $fields);
+    $this->assertArrayHasKey('pass', $fields);
+    $this->assertArrayHasKey('mail', $fields);
+    $this->assertArrayHasKey('uid', $fields);
+    $this->assertArrayHasKey('roles', $fields);
+    $userSource->rewind();
+    $values = $userSource->current()->getSource();
+    $this->assertEquals('example@example.com', $values['mail'][0]['value']);
+    $this->assertEquals('user123', $values['name'][0]['value']);
+    $this->assertEquals(1, $values['uid']);
+    $this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
+  }
+
+  /**
+   * Tests file source plugin.
+   */
+  public function testFileSource() {
+    $file = File::create([
+      'filename' => 'foo.txt',
+      'uid' => $this->user->id(),
+      'uri' => 'public://foo.txt',
+    ]);
+    $file->save();
+
+    $fileSource = $this->sourcePluginManager->createInstance('entity:file', [], $this->migration);
+    $this->migration->expects(self::once())->method('getSourcePlugin')->willReturn($fileSource);
+    $this->migration->expects(self::once())->method('getDestinationIds')->willReturn([1]);
+    $ids = $fileSource->getIds();
+    $this->assertArrayHasKey('fid', $ids);
+    $fields = $fileSource->fields();
+    $this->assertArrayHasKey('fid', $fields);
+    $this->assertArrayHasKey('filemime', $fields);
+    $this->assertArrayHasKey('filename', $fields);
+    $this->assertArrayHasKey('uid', $fields);
+    $this->assertArrayHasKey('uri', $fields);
+    $fileSource->rewind();
+    $values = $fileSource->current()->getSource();
+    $this->assertEquals('text/plain', $values['filemime'][0]['value']);
+    $this->assertEquals('public://foo.txt', $values['uri'][0]['value']);
+    $this->assertEquals('foo.txt', $values['filename'][0]['value']);
+    $this->assertEquals(1, $values['fid']);
+  }
+
+  /**
+   * Tests node source plugin.
+   */
+  public function testNodeSource() {
+    $nodeSource = $this->sourcePluginManager->createInstance('entity:node', ['bundle' => $this->bundle], $this->migration);
+    $this->migration->expects(self::exactly(2))->method('getSourcePlugin')->willReturn($nodeSource);
+    $this->migration->expects(self::at(0))->method('getDestinationIds')->willReturn([1, 'en']);
+    $this->migration->expects(self::at(1))->method('getDestinationIds')->willReturn([2, 'fr']);
+    $ids = $nodeSource->getIds();
+    $this->assertArrayHasKey('langcode', $ids);
+    $this->assertArrayHasKey('nid', $ids);
+    $fields = $nodeSource->fields();
+    $this->assertArrayHasKey('nid', $fields);
+    $this->assertArrayHasKey('vid', $fields);
+    $this->assertArrayHasKey('title', $fields);
+    $this->assertArrayHasKey('uid', $fields);
+    $this->assertArrayHasKey('sticky', $fields);
+    $nodeSource->rewind();
+    $values = $nodeSource->current()->getSource();
+    $this->assertEquals($this->bundle, $values['type'][0]['target_id']);
+    $this->assertEquals(1, $values['nid']);
+    $this->assertEquals('en', $values['langcode']);
+    $this->assertEquals(1, $values['status'][0]['value']);
+    $this->assertEquals('Apples', $values['title'][0]['value']);
+    $this->assertEquals(1, $values['default_langcode'][0]['value']);
+    $this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
+    $nodeSource->next();
+    $values = $nodeSource->current()->getSource();
+    $this->assertEquals($this->bundle, $values['type'][0]['target_id']);
+    $this->assertEquals(1, $values['nid']);
+    $this->assertEquals('fr', $values['langcode']);
+    $this->assertEquals(1, $values['status'][0]['value']);
+    $this->assertEquals('Pommes', $values['title'][0]['value']);
+    $this->assertEquals(0, $values['default_langcode'][0]['value']);
+    $this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
+  }
+
+  /**
+   * Tests media source plugin.
+   */
+  public function testMediaSource() {
+    $mediaType = $this->createMediaType('test');
+    $media = Media::create([
+      'name' => 'Foo media',
+      'uid' => $this->user->id(),
+      'bundle' => $mediaType->id(),
+    ]);
+    $media->save();
+
+    $mediaSource = $this->sourcePluginManager->createInstance('entity:media', ['bundle' => 'image'], $this->migration);
+    $this->migration->expects(self::once())->method('getSourcePlugin')->willReturn($mediaSource);
+    $this->migration->expects(self::once())->method('getDestinationIds')->willReturn([1]);
+    $ids = $mediaSource->getIds();
+    $this->assertArrayHasKey('langcode', $ids);
+    $this->assertArrayHasKey('mid', $ids);
+    $fields = $mediaSource->fields();
+    $this->assertArrayHasKey('bundle', $fields);
+    $this->assertArrayHasKey('mid', $fields);
+    $this->assertArrayHasKey('name', $fields);
+    $this->assertArrayHasKey('status', $fields);
+    $mediaSource->rewind();
+    $values = $mediaSource->current()->getSource();
+    $this->assertEquals(1, $values['mid']);
+    $this->assertEquals('Foo media', $values['name'][0]['value']);
+    $this->assertEquals('Foo media', $values['thumbnail'][0]['title']);
+    $this->assertEquals(1, $values['uid'][0]['target_id']);
+    $this->assertEquals('image', $values['bundle'][0]['target_id']);
+  }
+
+  /**
+   * Tests term source plugin.
+   */
+  public function testTermSource() {
+    $term2 = Term::create([
+      'vid' => $this->vocabulary,
+      'name' => 'Granny Smith',
+      'uid' => $this->user->id(),
+      'parent' => 1,
+    ]);
+    $term2->save();
+
+    $termSource = $this->sourcePluginManager->createInstance('entity:taxonomy_term', ['bundle' => $this->vocabulary], $this->migration);
+    $this->migration->expects(self::exactly(2))->method('getSourcePlugin')->willReturn($termSource);
+    $this->migration->expects(self::at(0))->method('getDestinationIds')->willReturn([1]);
+    $this->migration->expects(self::at(1))->method('getDestinationIds')->willReturn([2]);
+    $ids = $termSource->getIds();
+    $this->assertArrayHasKey('langcode', $ids);
+    $this->assertArrayHasKey('tid', $ids);
+    $fields = $termSource->fields();
+    $this->assertArrayHasKey('vid', $fields);
+    $this->assertArrayHasKey('tid', $fields);
+    $this->assertArrayHasKey('name', $fields);
+    $termSource->rewind();
+    $values = $termSource->current()->getSource();
+    $this->assertEquals($this->vocabulary, $values['vid'][0]['target_id']);
+    $this->assertEquals(1, $values['tid']);
+    // @TODO: add test coverage for parent after
+    // https://www.drupal.org/project/drupal/issues/2543726
+    $this->assertEquals('Apples', $values['name'][0]['value']);
+    $termSource->next();
+    $values = $termSource->current()->getSource();
+    $this->assertEquals($this->vocabulary, $values['vid'][0]['target_id']);
+    $this->assertEquals(2, $values['tid']);
+    // @TODO: add test coverage for parent after
+    // https://www.drupal.org/project/drupal/issues/2543726
+    $this->assertEquals('Granny Smith', $values['name'][0]['value']);
+  }
+
+  /**
+   * Create a media type for a source plugin.
+   *
+   * @param string $media_source_name
+   *   The name of the media source.
+   *
+   * @return \Drupal\media\MediaTypeInterface
+   *   A media type.
+   */
+  protected function createMediaType($media_source_name) {
+    $media_type = MediaType::create([
+      'id' => 'image',
+      'label' => 'Image',
+      'source' => $media_source_name,
+      'new_revision' => FALSE,
+    ]);
+    $media_type->save();
+    $source_field = $media_type->getSource()->createSourceField($media_type);
+    // The media type form creates a source field if it does not exist yet. The
+    // same must be done in a kernel test, since it does not use that form.
+    // @see \Drupal\media\MediaTypeForm::save()
+    $source_field->getFieldStorageDefinition()->save();
+    // The source field storage has been created, now the field can be saved.
+    $source_field->save();
+    $media_type->set('source_configuration', [
+      'source_field' => $source_field->getName(),
+    ])->save();
+    return $media_type;
+  }
+
+}
