diff --git a/.travis.yml b/.travis.yml
index af2c9d9..00133d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,9 +42,8 @@ before_install:
 script:
   - phpcs --report=full --standard=Drupal "$TRAVIS_BUILD_DIR" || true
   - cd ~/
-  - git clone --depth 1 --branch 8.0.x http://git.drupal.org/project/drupal.git
+  - git clone --depth 1 --branch 8.4.x http://git.drupal.org/project/drupal.git
   - cd drupal/modules
-  - git clone --depth 1 --branch 8.x-1.x http://git.drupal.org/project/media_entity.git
   - ln -s $TRAVIS_BUILD_DIR
   - cd ../
   - ./vendor/bin/phpunit -c core modules/media_entity_instagram/tests/src/Unit
diff --git a/README.md b/README.md
index 18b114e..a7a2009 100644
--- a/README.md
+++ b/README.md
@@ -8,43 +8,19 @@ entity within any other Drupal entity.
 
 ## About Media entity Instagram
 
-This module provides Instagram integration for Media entity (i.e. media type provider
+This module provides Instagram integration for Media (i.e. media type provider
 plugin).
 
 ### Instagram API
-This module uses Instagrams oembed API to fetch the instagram html and all the metadata.
+This module uses Instagrams oembed API to fetch the instagram html and all the
+metadata.
 You will need to:
 
-- Create a Media bundle with the type provider "Instagram".
-- On that bundle create a field for the Instagram url/source (this should be a plain text or link field).
-- Return to the bundle configuration and set "Field with source information" to use that field.
-
-### Storing field values
-If you want to store the fields that are retrieved from Instagram you should create appropriate fields on the created media bundle (id) and map this to the fields provided by Instagram.php.
-
-**NOTE:** At the moment there is no GUI for that, so the only method of doing that for now is via CMI.
-
-This would be an example of that (the field_map section):
-
-```
-langcode: en
-status: true
-dependencies:
-  module:
-    - media_entity_instagram
-id: instagram
-label: Instagram
-description: 'Instagram photo/video to be used with content.'
-type: instagram
-type_configuration:
-  source_field: link
-field_map:
-  id: instagram_id
-  type: instagram_type
-  thumbnail: instagram_thumbnail
-  username: instagram_username
-  caption: instagram_caption
-```
+- Create a Media type with the type provider "Instagram".
+- On that type create a field for the Instagram url/source (this should be a
+plain text or link field).
+- Return to the type configuration and set "Field with source information" to
+use that field.
 
 Project page: http://drupal.org/project/media_entity_instagram
 
diff --git a/config/schema/media_entity_instagram.schema.yml b/config/schema/media_entity_instagram.schema.yml
index 9d74d44..8a11bdf 100644
--- a/config/schema/media_entity_instagram.schema.yml
+++ b/config/schema/media_entity_instagram.schema.yml
@@ -6,13 +6,9 @@ media_entity_instagram.settings:
       type: string
       label: 'Base folder for thumbnails'
 
-media_entity.bundle.type.instagram:
-  type: mapping
-  label: 'Instagram type configuration'
-  mapping:
-    source_field:
-      type: string
-      label: 'Field with embed code/URL'
+media.source.instagram:
+  type: media.source.field_aware
+  label: '"Instagram" media source configuration'
 
 field.formatter.settings.instagram_embed:
   type: mapping
diff --git a/media_entity_instagram.info.yml b/media_entity_instagram.info.yml
index b5e17a7..0af2697 100644
--- a/media_entity_instagram.info.yml
+++ b/media_entity_instagram.info.yml
@@ -4,4 +4,5 @@ type: module
 package: Media
 core: 8.x
 dependencies:
-  - media_entity:media_entity
+  - drupal:media
+  - drupal:system (>= 8.4.0)
diff --git a/media_entity_instagram.install b/media_entity_instagram.install
index f2cd589..ddd9da2 100644
--- a/media_entity_instagram.install
+++ b/media_entity_instagram.install
@@ -9,7 +9,39 @@
  * Implements hook_install().
  */
 function media_entity_instagram_install() {
+  // Copy the icon(s) provided by this module to the destination defined in
+  // "media.settings:icon_base_uri".
   $source = drupal_get_path('module', 'media_entity_instagram') . '/images/icons';
-  $destination = \Drupal::config('media_entity.settings')->get('icon_base');
-  media_entity_copy_icons($source, $destination);
+  $destination = \Drupal::config('media.settings')->get('icon_base_uri');
+  file_prepare_directory($destination, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+  $files = file_scan_directory($source, '/.*\.(svg|png|jpg|jpeg|gif)$/');
+  foreach ($files as $file) {
+    file_unmanaged_copy($file->uri, $destination, FILE_EXISTS_ERROR);
+  }
+}
+
+/**
+ * Implements hook_requirements().
+ */
+function media_entity_instagram_requirements($phase) {
+  $requirements = [];
+  if ($phase == 'install') {
+    $destination = \Drupal::config('media.settings')->get('icon_base_uri');
+    file_prepare_directory($destination, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+    $is_writable = is_writable($destination);
+    $is_directory = is_dir($destination);
+    if (!$is_writable || !$is_directory) {
+      if (!$is_directory) {
+        $error = t('The directory %directory does not exist.', ['%directory' => $destination]);
+      }
+      else {
+        $error = t('The directory %directory is not writable.', ['%directory' => $destination]);
+      }
+      $description = t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the <a href=":handbook_url">online handbook</a>.', [':handbook_url' => 'https://www.drupal.org/server-permissions']);
+      $description = $error . ' ' . $description;
+      $requirements['media_entity_instagram']['description'] = $description;
+      $requirements['media_entity_instagram']['severity'] = REQUIREMENT_ERROR;
+    }
+  }
+  return $requirements;
 }
diff --git a/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php b/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php
index 875d7a2..01965d7 100644
--- a/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/InstagramEmbedFormatter.php
@@ -3,12 +3,12 @@
 namespace Drupal\media_entity_instagram\Plugin\Field\FieldFormatter;
 
 use Drupal\Core\Field\FieldDefinitionInterface;
+use Drupal\Core\Field\FieldItemInterface;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\FormatterBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-use Drupal\media_entity\EmbedCodeValueTrait;
-use Drupal\media_entity_instagram\Plugin\MediaEntity\Type\Instagram;
+use Drupal\media_entity_instagram\Plugin\media\Source\Instagram;
 use Drupal\media_entity_instagram\InstagramEmbedFetcher;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -25,12 +25,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
  */
 class InstagramEmbedFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
 
-  use EmbedCodeValueTrait;
-
   /**
    * The instagram fetcher.
    *
-   * @var \Drupal\media_entity_instagram\Plugin\MediaEntity\Type\InstagramEmbedFetcher
+   * @var \Drupal\media_entity_instagram\InstagramEmbedFetcher
    */
   protected $fetcher;
 
@@ -155,4 +153,27 @@ class InstagramEmbedFormatter extends FormatterBase implements ContainerFactoryP
     return $summary;
   }
 
+  /**
+   * Extracts the raw embed code from input which may or may not be wrapped.
+   *
+   * @param mixed $value
+   *   The input value. Can be a normal string or a value wrapped by the
+   *   Typed Data API.
+   *
+   * @return string|null
+   *   The raw embed code.
+   */
+  protected function getEmbedCode($value) {
+    if (is_string($value)) {
+      return $value;
+    }
+    elseif ($value instanceof FieldItemInterface) {
+      $class = get_class($value);
+      $property = $class::mainPropertyName();
+      if ($property) {
+        return $value->$property;
+      }
+    }
+  }
+
 }
diff --git a/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php b/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php
index 1cd9516..367b7f3 100644
--- a/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php
+++ b/src/Plugin/Validation/Constraint/InstagramEmbedCodeConstraintValidator.php
@@ -2,8 +2,8 @@
 
 namespace Drupal\media_entity_instagram\Plugin\Validation\Constraint;
 
-use Drupal\media_entity\EmbedCodeValueTrait;
-use Drupal\media_entity_instagram\Plugin\MediaEntity\Type\Instagram;
+use Drupal\Core\Field\FieldItemInterface;
+use Drupal\media_entity_instagram\Plugin\media\Source\Instagram;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
 
@@ -12,27 +12,34 @@ use Symfony\Component\Validator\ConstraintValidator;
  */
 class InstagramEmbedCodeConstraintValidator extends ConstraintValidator {
 
-  use EmbedCodeValueTrait;
-
   /**
    * {@inheritdoc}
    */
   public function validate($value, Constraint $constraint) {
-    $value = $this->getEmbedCode($value);
-    if (!isset($value)) {
-      return;
+    $data = '';
+    if (is_string($value)) {
+      $data = $value;
     }
-
-    $matches = [];
-    foreach (Instagram::$validationRegexp as $pattern => $key) {
-      if (preg_match($pattern, $value, $item_matches)) {
-        $matches[] = $item_matches;
+    elseif ($value instanceof FieldItemInterface) {
+      $class = get_class($value);
+      $property = $class::mainPropertyName();
+      if ($property) {
+        $data = $value->{$property};
       }
     }
 
-    if (empty($matches)) {
-      $this->context->addViolation($constraint->message);
+    if ($data) {
+      $matches = [];
+      foreach (Instagram::$validationRegexp as $pattern => $key) {
+        if (preg_match($pattern, $data, $item_matches)) {
+          $matches[] = $item_matches;
+        }
+      }
+      if (empty($matches)) {
+        $this->context->addViolation($constraint->message);
+      }
     }
+
   }
 
 }
diff --git a/src/Plugin/MediaEntity/Type/Instagram.php b/src/Plugin/media/Source/Instagram.php
similarity index 63%
rename from src/Plugin/MediaEntity/Type/Instagram.php
rename to src/Plugin/media/Source/Instagram.php
index 6128f4f..4aa51a3 100644
--- a/src/Plugin/MediaEntity/Type/Instagram.php
+++ b/src/Plugin/media/Source/Instagram.php
@@ -1,13 +1,14 @@
 <?php
 
-namespace Drupal\media_entity_instagram\Plugin\MediaEntity\Type;
+namespace Drupal\media_entity_instagram\Plugin\media\Source;
 
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\media_entity\MediaInterface;
-use Drupal\media_entity\MediaTypeBase;
+use Drupal\Core\Field\FieldTypePluginManagerInterface;
+use Drupal\media\MediaInterface;
+use Drupal\media\MediaSourceBase;
+use Drupal\media\MediaSourceFieldConstraintsInterface;
 use Drupal\media_entity_instagram\InstagramEmbedFetcher;
 use GuzzleHttp\Client;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -15,20 +16,15 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 /**
  * Provides media type plugin for Instagram.
  *
- * @MediaType(
+ * @MediaSource(
  *   id = "instagram",
  *   label = @Translation("Instagram"),
- *   description = @Translation("Provides business logic and metadata for Instagram.")
+ *   description = @Translation("Provides business logic and metadata for Instagram."),
+ *   allowed_field_types = {"string", "string_long", "link"},
+ *   default_thumbnail_filename = "instagram.png"
  * )
  */
-class Instagram extends MediaTypeBase {
-
-  /**
-   * Config factory service.
-   *
-   * @var \Drupal\Core\Config\ConfigFactoryInterface
-   */
-  protected $configFactory;
+class Instagram extends MediaSourceBase implements MediaSourceFieldConstraintsInterface {
 
   /**
    * The instagram fetcher.
@@ -59,14 +55,15 @@ class Instagram extends MediaTypeBase {
    *   Entity field manager service.
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   Config factory service.
+   * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
+   *   The field type plugin manager service.
    * @param \Drupal\media_entity_instagram\InstagramEmbedFetcher $fetcher
    *   Instagram fetcher service.
    * @param \GuzzleHttp\Client $httpClient
    *   Guzzle client.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, ConfigFactoryInterface $config_factory, InstagramEmbedFetcher $fetcher, Client $httpClient) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $config_factory->get('media_entity.settings'));
-    $this->configFactory = $config_factory;
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, ConfigFactoryInterface $config_factory, FieldTypePluginManagerInterface $field_type_manager, InstagramEmbedFetcher $fetcher, Client $httpClient) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $field_type_manager, $config_factory);
     $this->fetcher = $fetcher;
     $this->httpClient = $httpClient;
   }
@@ -82,6 +79,7 @@ class Instagram extends MediaTypeBase {
       $container->get('entity_type.manager'),
       $container->get('entity_field.manager'),
       $container->get('config.factory'),
+      $container->get('plugin.manager.field.field_type'),
       $container->get('media_entity_instagram.instagram_embed_fetcher'),
       $container->get('http_client')
     );
@@ -100,7 +98,7 @@ class Instagram extends MediaTypeBase {
   /**
    * {@inheritdoc}
    */
-  public function providedFields() {
+  public function getMetadataAttributes() {
     return [
       'shortcode' => $this->t('Instagram shortcode'),
       'id' => $this->t('Media ID'),
@@ -116,20 +114,38 @@ class Instagram extends MediaTypeBase {
   /**
    * {@inheritdoc}
    */
-  public function getField(MediaInterface $media, $name) {
+  public function getMetadata(MediaInterface $media, $attribute_name) {
+    if ($attribute_name == 'default_name') {
+      // Try to get some fields that need the API, if not available, just use
+      // the shortcode as default name.
+      $username = $this->getMetadata($media, 'username');
+      $id = $this->getMetadata($media, 'id');
+      if ($username && $id) {
+        return $username . ' - ' . $id;
+      }
+      else {
+        $code = $this->getMetadata($media, 'shortcode');
+        if (!empty($code)) {
+          return $code;
+        }
+      }
+      // Fallback to the parent's default name if everything else failed.
+      return parent::getMetadata($media, 'default_name');
+    }
+
     $matches = $this->matchRegexp($media);
 
     if (!$matches['shortcode']) {
       return FALSE;
     }
 
-    if ($name == 'shortcode') {
+    if ($attribute_name == 'shortcode') {
       return $matches['shortcode'];
     }
 
     // If we have auth settings return the other fields.
     if ($instagram = $this->fetcher->fetchInstagramEmbed($matches['shortcode'])) {
-      switch ($name) {
+      switch ($attribute_name) {
         case 'id':
           if (isset($instagram['media_id'])) {
             return $instagram['media_id'];
@@ -149,7 +165,7 @@ class Instagram extends MediaTypeBase {
           return FALSE;
 
         case 'thumbnail_local':
-          $local_uri = $this->getField($media, 'thumbnail_local_uri');
+          $local_uri = $this->getMetadata($media, 'thumbnail_local_uri');
 
           if ($local_uri) {
             if (file_exists($local_uri)) {
@@ -160,7 +176,7 @@ class Instagram extends MediaTypeBase {
               $directory = dirname($local_uri);
               file_prepare_directory($directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
 
-              $image_url = $this->getField($media, 'thumbnail');
+              $image_url = $this->getMetadata($media, 'thumbnail');
 
               $response = $this->httpClient->get($image_url);
               if ($response->getStatusCode() == 200) {
@@ -197,49 +213,14 @@ class Instagram extends MediaTypeBase {
   /**
    * {@inheritdoc}
    */
-  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
-    $options = [];
-    $bundle = $form_state->getFormObject()->getEntity();
-    $allowed_field_types = ['string', 'string_long', 'link'];
-    foreach ($this->entityFieldManager->getFieldDefinitions('media', $bundle->id()) as $field_name => $field) {
-      if (in_array($field->getType(), $allowed_field_types) && !$field->getFieldStorageDefinition()->isBaseField()) {
-        $options[$field_name] = $field->getLabel();
-      }
-    }
-
-    $form['source_field'] = [
-      '#type' => 'select',
-      '#title' => $this->t('Field with source information'),
-      '#description' => $this->t('Field on media entity that stores Instagram embed code or URL. You can create a bundle without selecting a value for this dropdown initially. This dropdown can be populated after adding fields to the bundle.'),
-      '#default_value' => empty($this->configuration['source_field']) ? NULL : $this->configuration['source_field'],
-      '#options' => $options,
-    ];
-
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function attachConstraints(MediaInterface $media) {
-    parent::attachConstraints($media);
-
-    if (isset($this->configuration['source_field'])) {
-      $source_field_name = $this->configuration['source_field'];
-      if ($media->hasField($source_field_name)) {
-        foreach ($media->get($source_field_name) as &$embed_code) {
-          /** @var \Drupal\Core\TypedData\DataDefinitionInterface $typed_data */
-          $typed_data = $embed_code->getDataDefinition();
-          $typed_data->addConstraint('InstagramEmbedCode');
-        }
-      }
-    }
+  public function getSourceFieldConstraints() {
+    return ['InstagramEmbedCode' => []];
   }
 
   /**
    * Runs preg_match on embed code/URL.
    *
-   * @param \Drupal\media_entity\MediaInterface $media
+   * @param \Drupal\media\MediaInterface $media
    *   Media object.
    *
    * @return array|bool
@@ -264,43 +245,4 @@ class Instagram extends MediaTypeBase {
     return FALSE;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getDefaultThumbnail() {
-    return $this->config->get('icon_base') . '/instagram.png';
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function thumbnail(MediaInterface $media) {
-    if ($local_image = $this->getField($media, 'thumbnail_local')) {
-      return $local_image;
-    }
-
-    return $this->getDefaultThumbnail();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getDefaultName(MediaInterface $media) {
-    // Try to get some fields that need the API, if not available, just use the
-    // shortcode as default name.
-    $username = $this->getField($media, 'username');
-    $id = $this->getField($media, 'id');
-    if ($username && $id) {
-      return $username . ' - ' . $id;
-    }
-    else {
-      $code = $this->getField($media, 'shortcode');
-      if (!empty($code)) {
-        return $code;
-      }
-    }
-
-    return parent::getDefaultName($media);
-  }
-
 }
diff --git a/src/Tests/InstagramEmbedFormatterTest.php b/src/Tests/InstagramEmbedFormatterTest.php
deleted file mode 100644
index 0e1e167..0000000
--- a/src/Tests/InstagramEmbedFormatterTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-<?php
-
-namespace Drupal\media_entity_instagram\Tests;
-
-use Drupal\simpletest\WebTestBase;
-use Drupal\media_entity\Tests\MediaTestTrait;
-
-/**
- * Tests for Instagram embed formatter.
- *
- * @group media_entity_instagram
- */
-class InstagramEmbedFormatterTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = [
-    'media_entity_instagram',
-    'media_entity',
-    'node',
-    'field_ui',
-    'views_ui',
-    'block',
-  ];
-
-  use MediaTestTrait;
-
-  /**
-   * The test user.
-   *
-   * @var \Drupal\User\UserInterface
-   */
-  protected $adminUser;
-
-  /**
-   * Media entity machine id.
-   *
-   * @var string
-   */
-  protected $mediaId = 'instagram';
-
-  /**
-   * The test media bundle.
-   *
-   * @var \Drupal\media_entity\MediaBundleInterface
-   */
-  protected $testBundle;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $bundle['bundle'] = $this->mediaId;
-    $this->testBundle = $this->drupalCreateMediaBundle($bundle, 'instagram');
-    $this->drupalPlaceBlock('local_actions_block');
-    $this->adminUser = $this->drupalCreateUser([
-      'administer media',
-      'administer media bundles',
-      'administer media fields',
-      'administer media form display',
-      'administer media display',
-      // Media entity permissions.
-      'view media',
-      'create media',
-      'update media',
-      'update any media',
-      'delete media',
-      'delete any media',
-      // Other permissions.
-      'administer views',
-    ]);
-    $this->drupalLogin($this->adminUser);
-  }
-
-  /**
-   * Tests adding and editing an instagram embed formatter.
-   */
-  public function testManageFieldFormatter() {
-    // Test and create one media bundle.
-    $bundle = $this->testBundle;
-
-    // Assert that the media bundle has the expected values before proceeding.
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id());
-    $this->assertFieldByName('label', $bundle->label());
-    $this->assertFieldByName('type', 'instagram');
-
-    // Add and save field settings (Embed code).
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id() . '/fields/add-field');
-    $edit_conf = [
-      'new_storage_type' => 'string_long',
-      'label' => 'Embed code',
-      'field_name' => 'embed_code',
-    ];
-    $this->drupalPostForm(NULL, $edit_conf, t('Save and continue'));
-    $this->assertText('These settings apply to the ' . $edit_conf['label'] . ' field everywhere it is used.');
-    $edit = [
-      'cardinality' => 'number',
-      'cardinality_number' => '1',
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save field settings'));
-    $this->assertText('Updated field ' . $edit_conf['label'] . ' field settings.');
-
-    // Set the new field as required.
-    $edit = [
-      'required' => TRUE,
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save settings'));
-    $this->assertText('Saved ' . $edit_conf['label'] . ' configuration.');
-
-    // Assert that the new field configuration has been successfully saved.
-    $xpath = $this->xpath('//*[@id="field-embed-code"]');
-    $this->assertEqual((string) $xpath[0]->td[0], 'Embed code');
-    $this->assertEqual((string) $xpath[0]->td[1], 'field_embed_code');
-    $this->assertEqual((string) $xpath[0]->td[2]->a, 'Text (plain, long)');
-
-    // Test if edit worked and if new field values have been saved as
-    // expected.
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id());
-    $this->assertFieldByName('label', $bundle->label());
-    $this->assertFieldByName('type', 'instagram');
-    $this->assertFieldByName('type_configuration[instagram][source_field]', 'field_embed_code');
-    $this->drupalPostForm(NULL, NULL, t('Save media bundle'));
-    $this->assertText('The media bundle ' . $bundle->label() . ' has been updated.');
-    $this->assertText($bundle->label());
-
-    $this->drupalGet('admin/structure/media/manage/' . $bundle->id() . '/display');
-
-    // Set and save the settings of the new field.
-    $edit = [
-      'fields[field_embed_code][label]' => 'above',
-      'fields[field_embed_code][type]' => 'instagram_embed',
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save'));
-    $this->assertText('Your settings have been saved.');
-
-    // First set absolute size of the embed.
-    $this->drupalPostAjaxForm(NULL, [], 'field_embed_code_settings_edit');
-    $edit = [
-      'fields[field_embed_code][settings_edit_form][settings][hidecaption]' => FALSE,
-    ];
-    $this->drupalPostAjaxForm(NULL, $edit, 'field_embed_code_plugin_settings_update');
-    $this->drupalPostForm(NULL, [], t('Save'));
-    $this->assertText('Your settings have been saved.');
-    $this->assertText('Caption: Visible');
-
-    // Create and save the media with an instagram media code.
-    $this->drupalGet('media/add/' . $bundle->id());
-
-    // Example instagram from https://www.instagram.com/developer/embedding/
-    $instagram = 'https://www.instagram.com/p/bNd86MSFv6/';
-
-    $edit = [
-      'name[0][value]' => 'My test instagram',
-      'field_embed_code[0][value]' => $instagram,
-    ];
-    $this->drupalPostForm(NULL, $edit, t('Save and publish'));
-
-    // Assert that the media has been successfully saved.
-    $this->assertText('My test instagram');
-    $this->assertText('Embed code');
-
-    // Assert that the formatter exists on this page and that it has absolute
-    // size.
-    $this->assertFieldByXPath('//blockquote');
-    $this->assertRaw('platform.instagram.com/en_US/embeds.js');
-  }
-
-}
diff --git a/tests/src/Unit/ConstraintsTest.php b/tests/src/Unit/ConstraintsTest.php
index f15f003..0d59344 100644
--- a/tests/src/Unit/ConstraintsTest.php
+++ b/tests/src/Unit/ConstraintsTest.php
@@ -11,7 +11,7 @@ use Drupal\Tests\UnitTestCase;
 /**
  * Tests media_entity_instagram constrains.
  *
- * @group media_entity
+ * @group media
  */
 class ConstraintsTest extends UnitTestCase {
 
