diff --git a/jsonapi.services.yml b/jsonapi.services.yml
index 18f73f1..6fd138c 100644
--- a/jsonapi.services.yml
+++ b/jsonapi.services.yml
@@ -18,6 +18,7 @@ services:
     class: Drupal\jsonapi\Normalizer\EntityReferenceFieldNormalizer
     tags:
       - { name: normalizer, priority: 31 }
+    arguments: ['@jsonapi.link_manager']
   serializer.normalizer.file_entity.jsonapi:
     class: Drupal\jsonapi\Normalizer\FileEntityNormalizer
     tags:
@@ -25,12 +26,12 @@ services:
     arguments: ['@entity.manager', '@http_client', '@rest.link_manager', '@module_handler']
   serializer.normalizer.entity.jsonapi:
     class: Drupal\jsonapi\Normalizer\ContentEntityNormalizer
-    arguments: ['@rest.link_manager', '@entity_type.manager', '@jsonapi.resource.manager']
+    arguments: ['@entity_type.manager', '@jsonapi.resource.manager', '@jsonapi.link_manager']
     tags:
       - { name: normalizer, priority: 21 }
   serializer.normalizer.document_root.jsonapi:
     class: Drupal\jsonapi\Normalizer\DocumentRootNormalizer
-    arguments: ['@rest.link_manager', '@entity_type.manager', '@jsonapi.resource.manager']
+    arguments: ['@jsonapi.resource.manager', '@jsonapi.link_manager']
     tags:
       - { name: normalizer, priority: 22 }
   serializer.encoder.jsonapi:
@@ -50,4 +51,6 @@ services:
       - { name: route_enhancer }
   jsonapi.query_builder:
     class: Drupal\jsonapi\Query\QueryBuilder
-    arguments: [ '@entity_type.manager' ]
+    arguments: ['@entity_type.manager']
+  jsonapi.link_manager:
+    class: Drupal\jsonapi\LinkManager\LinkManager
diff --git a/src/LinkManager/LinkManager.php b/src/LinkManager/LinkManager.php
new file mode 100644
index 0000000..7a0cb0b
--- /dev/null
+++ b/src/LinkManager/LinkManager.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\jsonapi\LinkManager;
+
+use Drupal\Core\Url;
+use Drupal\jsonapi\Configuration\ResourceConfigInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Class LinkManager.
+ *
+ * @package Drupal\jsonapi
+ */
+class LinkManager implements LinkManagerInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getEntityLink($entity_id, ResourceConfigInterface $resource_config, array $route_parameters, $key) {
+    $route_parameters += [
+      $resource_config->getEntityTypeId() => $entity_id,
+    ];
+    $prefix = $resource_config->getGlobalConfig()->get('prefix');
+    $route_key = sprintf('%s.dynamic.%s.%s', $prefix, $resource_config->getTypeName(), $key);
+    $url = Url::fromRoute($route_key, $route_parameters, ['absolute' => TRUE]);
+    return $url->setRouteParameter('_format', 'api_json')->toString();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getRequestLink(Request $request) {
+    return Url::createFromRequest($request)
+      ->setOption('absolute', TRUE)
+      ->setOption('query', (array) $request->query->getIterator())
+      ->toString();
+  }
+
+}
diff --git a/src/LinkManager/LinkManagerInterface.php b/src/LinkManager/LinkManagerInterface.php
new file mode 100644
index 0000000..2657fe6
--- /dev/null
+++ b/src/LinkManager/LinkManagerInterface.php
@@ -0,0 +1,44 @@
+<?php
+
+
+namespace Drupal\jsonapi\LinkManager;
+
+use Drupal\jsonapi\Configuration\ResourceConfigInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Class LinkManagerInterface.
+ *
+ * @package Drupal\jsonapi
+ */
+interface LinkManagerInterface {
+
+  /**
+   * Gets a link for the entity.
+   *
+   * @param int $entity_id
+   *   The entity ID to generate the link for.
+   * @param \Drupal\jsonapi\Configuration\ResourceConfigInterface $resource_config
+   *   The resource configuration.
+   * @param array $route_parameters
+   *   Parameters for the route generation.
+   * @param string $key
+   *   A key to build the route identifier.
+   *
+   * @return string
+   *   The URL string.
+   */
+  public function getEntityLink($entity_id, ResourceConfigInterface $resource_config, array $route_parameters, $key);
+
+  /**
+   * Get the full URL for a given request object.
+   *
+   * @param \Symfony\Component\HttpFoundation\Request $request
+   *   The request object.
+   *
+   * @return string
+   *   The full URL.
+   */
+  public function getRequestLink(Request $request);
+
+}
diff --git a/src/Normalizer/ContentEntityNormalizer.php b/src/Normalizer/ContentEntityNormalizer.php
index 4988ab9..0d49c66 100644
--- a/src/Normalizer/ContentEntityNormalizer.php
+++ b/src/Normalizer/ContentEntityNormalizer.php
@@ -8,7 +8,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\EntityReferenceFieldItemList;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\jsonapi\Configuration\ResourceManagerInterface;
-use Drupal\rest\LinkManager\LinkManagerInterface;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 
 /**
  * Converts the Drupal entity object structure to a HAL array structure.
@@ -32,7 +32,7 @@ class ContentEntityNormalizer extends NormalizerBase implements ContentEntityNor
   /**
    * The link manager.
    *
-   * @var LinkManagerInterface
+   * @var \Drupal\jsonapi\LinkManager\LinkManagerInterface
    */
   protected $linkManager;
 
@@ -53,17 +53,15 @@ class ContentEntityNormalizer extends NormalizerBase implements ContentEntityNor
   /**
    * Constructs an ContentEntityNormalizer object.
    *
-   * @param \Drupal\rest\LinkManager\LinkManagerInterface $link_manager
-   *   The hypermedia link manager.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The entity type manager.
    * @param \Drupal\jsonapi\Configuration\ResourceManagerInterface $resource_manager
    *   The config resource manager.
    */
-  public function __construct(LinkManagerInterface $link_manager, EntityTypeManagerInterface $entity_type_manager, ResourceManagerInterface $resource_manager) {
-    $this->linkManager = $link_manager;
+  public function __construct(EntityTypeManagerInterface $entity_type_manager, ResourceManagerInterface $resource_manager, LinkManagerInterface $link_manager) {
     $this->entityTypeManager = $entity_type_manager;
     $this->resourceManager = $resource_manager;
+    $this->linkManager = $link_manager;
   }
 
   /**
@@ -101,7 +99,8 @@ class ContentEntityNormalizer extends NormalizerBase implements ContentEntityNor
       $normalizer_values[$field_name]->setPropertyType($property_type);
     }
 
-    return new Value\ContentEntityNormalizerValue($normalizer_values, $context, $entity, $this->linkManager, $this->entityTypeManager);
+    $link_context = ['link_manager' => $this->linkManager];
+    return new Value\ContentEntityNormalizerValue($normalizer_values, $context, $entity, $link_context);
   }
 
   /**
diff --git a/src/Normalizer/DocumentRootNormalizer.php b/src/Normalizer/DocumentRootNormalizer.php
index d6533e3..c3ee505 100644
--- a/src/Normalizer/DocumentRootNormalizer.php
+++ b/src/Normalizer/DocumentRootNormalizer.php
@@ -3,10 +3,9 @@
 namespace Drupal\jsonapi\Normalizer;
 
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\jsonapi\Configuration\ResourceManagerInterface;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 use Drupal\jsonapi\Resource\DocumentWrapperInterface;
-use Drupal\rest\LinkManager\LinkManagerInterface;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -24,40 +23,30 @@ class DocumentRootNormalizer extends NormalizerBase implements DocumentRootNorma
   protected $supportedInterfaceOrClass = DocumentWrapperInterface::class;
 
   /**
-   * The link manager.
-   *
-   * @var LinkManagerInterface
-   */
-  protected $linkManager;
-
-  /**
-   * The entity type manager.
+   * The resource manager.
    *
-   * @var EntityTypeManagerInterface
+   * @var \Drupal\jsonapi\Configuration\ResourceManagerInterface
    */
-  protected $entityTypeManager;
+  protected $resourceManager;
 
   /**
-   * The resource manager.
+   * The link manager to get the links.
    *
-   * @var \Drupal\jsonapi\Configuration\ResourceManagerInterface
+   * @var \Drupal\jsonapi\LinkManager\LinkManagerInterface
    */
-  protected $resourceManager;
+  protected $linkManager;
 
   /**
    * Constructs an ContentEntityNormalizer object.
    *
-   * @param \Drupal\rest\LinkManager\LinkManagerInterface $link_manager
-   *   The hypermedia link manager.
-   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
-   *   The entity type manager.
    * @param \Drupal\jsonapi\Configuration\ResourceManagerInterface $resource_manager
    *   The config resource manager.
+   * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface $link_manager
+   *   The link manager to get the links.
    */
-  public function __construct(LinkManagerInterface $link_manager, EntityTypeManagerInterface $entity_type_manager, ResourceManagerInterface $resource_manager) {
-    $this->linkManager = $link_manager;
-    $this->entityTypeManager = $entity_type_manager;
+  public function __construct(ResourceManagerInterface $resource_manager, LinkManagerInterface $link_manager) {
     $this->resourceManager = $resource_manager;
+    $this->linkManager = $link_manager;
   }
 
   /**
@@ -94,7 +83,9 @@ class DocumentRootNormalizer extends NormalizerBase implements DocumentRootNorma
       return $serializer->normalize($entity, $format, $context);
     }, $entities);
 
-    return new Value\DocumentRootNormalizerValue($normalizer_values, $context, $is_collection, $entities, $this->linkManager, $this->entityTypeManager);
+    return new Value\DocumentRootNormalizerValue($normalizer_values, $context, $is_collection, [
+      'link_manager' => $this->linkManager,
+    ]);
   }
 
   /**
diff --git a/src/Normalizer/EntityReferenceFieldNormalizer.php b/src/Normalizer/EntityReferenceFieldNormalizer.php
index 377a3f7..a98466a 100644
--- a/src/Normalizer/EntityReferenceFieldNormalizer.php
+++ b/src/Normalizer/EntityReferenceFieldNormalizer.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\jsonapi\Normalizer;
 
-use Drupal\Core\Config\Entity\ConfigEntityTypeInterface;
 use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
 use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 
 /**
  * Class EntityReferenceFieldNormalizer.
@@ -13,9 +13,29 @@ use Drupal\Core\Field\FieldItemListInterface;
  */
 class EntityReferenceFieldNormalizer extends FieldNormalizer {
 
+  /**
+   * {@inheritdoc}
+   */
   protected $supportedInterfaceOrClass = EntityReferenceFieldItemListInterface::class;
 
   /**
+   * The link manager.
+   *
+   * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface
+   */
+  protected $linkManager;
+
+  /**
+   * Instantiates a EntityReferenceFieldNormalizer object.
+   *
+   * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface $link_manager
+   *   The link manager.
+   */
+  public function __construct(LinkManagerInterface $link_manager) {
+    $this->linkManager = $link_manager;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function supportsNormalization($data, $format = NULL) {
@@ -49,10 +69,17 @@ class EntityReferenceFieldNormalizer extends FieldNormalizer {
         $normalizer_items[] = $this->serializer->normalize($field_item, $format, $context);
       }
     }
-    $cardinality = $field->getFieldDefinition()
+    $definition = $field->getFieldDefinition();
+    $cardinality = $definition
       ->getFieldStorageDefinition()
       ->getCardinality();
-    return new Value\EntityReferenceNormalizerValue($normalizer_items, $cardinality);
+    $link_context = [
+      'host_entity_id' => $field->getEntity()->id(),
+      'field_name' => $definition->getName(),
+      'link_manager' => $this->linkManager,
+      'resource_config' => $context['resource_config'],
+    ];
+    return new Value\EntityReferenceNormalizerValue($normalizer_items, $cardinality, $link_context);
   }
 
 
diff --git a/src/Normalizer/Value/ContentEntityNormalizerValue.php b/src/Normalizer/Value/ContentEntityNormalizerValue.php
index e967899..582ad2d 100644
--- a/src/Normalizer/Value/ContentEntityNormalizerValue.php
+++ b/src/Normalizer/Value/ContentEntityNormalizerValue.php
@@ -3,8 +3,6 @@
 namespace Drupal\jsonapi\Normalizer\Value;
 
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\rest\LinkManager\LinkManagerInterface;
 
 /**
  * Class ContentEntityNormalizerValue.
@@ -37,36 +35,35 @@ class ContentEntityNormalizerValue implements ContentEntityNormalizerValueInterf
   /**
    * The resource entity.
    *
-   * @param EntityInterface
+   * @param \Drupal\Core\Entity\EntityInterface
    */
   protected $entity;
 
   /**
    * The link manager.
    *
-   * @var LinkManagerInterface
+   * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface
    */
   protected $linkManager;
 
   /**
-   * The entity type manager.
-   *
-   * @var EntityTypeManagerInterface
-   */
-  protected $entityTypeManager;
-
-  /**
    * Instantiate a ContentEntityNormalizerValue object.
    *
    * @param FieldNormalizerValueInterface[] $values
    *   The normalized result.
+   * @param array $context
+   *   The context for the normalizer.
+   * @param \Drupal\Core\Entity\EntityInterface $entity
+   *   The entity.
+   * @param array $link_context
+   *   All the objects and variables needed to generate the links for this
+   *   relationship.
    */
-  public function __construct(array $values, array $context, EntityInterface $entity, LinkManagerInterface $link_manager, EntityTypeManagerInterface $entity_type_manager) {
+  public function __construct(array $values, array $context, EntityInterface $entity, array $link_context) {
     $this->values = $values;
     $this->context = $context;
     $this->entity = $entity;
-    $this->linkManager = $link_manager;
-    $this->entityTypeManager = $entity_type_manager;
+    $this->linkManager = $link_context['link_manager'];
     // Get an array of arrays of includes.
     $this->includes = array_map(function ($value) {
       return $value->getIncludes();
@@ -89,13 +86,14 @@ class ContentEntityNormalizerValue implements ContentEntityNormalizerValueInterf
       'id' => $this->entity->id(),
       'attributes' => [],
       'relationships' => [],
-      'links' => [
-        'self' => $this->getEntityUri($this->entity),
-        'type' => $this->linkManager->getTypeUri(
-          $this->entity->getEntityTypeId(),
-          $this->entity->bundle(), $this->context
-        ),
-      ],
+    ];
+    $rasterized['links'] = [
+      'self' => $this->linkManager->getEntityLink(
+        $rasterized['id'],
+        $this->context['resource_config'],
+        [],
+        'individual'
+      ),
     ];
 
     foreach ($this->getValues() as $field_name => $normalizer_value) {
@@ -136,23 +134,4 @@ class ContentEntityNormalizerValue implements ContentEntityNormalizerValueInterf
     }, $this->includes);
   }
 
-  /**
-   * Constructs the entity URI.
-   *
-   * @param \Drupal\Core\Entity\EntityInterface $entity
-   *   The entity.
-   *
-   * @return string
-   *   The entity URI.
-   */
-  protected function getEntityUri(EntityInterface $entity) {
-    // Some entity types don't provide a canonical link template, at least call
-    // out to ->url().
-    if ($entity->isNew() || !$entity->hasLinkTemplate('canonical')) {
-      return $entity->url('canonical', []);
-    }
-    $url = $entity->toUrl('canonical', ['absolute' => TRUE]);
-    return $url->setRouteParameter('_format', 'api_json')->toString();
-  }
-
 }
diff --git a/src/Normalizer/Value/DocumentRootNormalizerValue.php b/src/Normalizer/Value/DocumentRootNormalizerValue.php
index 156e83e..885c37d 100644
--- a/src/Normalizer/Value/DocumentRootNormalizerValue.php
+++ b/src/Normalizer/Value/DocumentRootNormalizerValue.php
@@ -2,6 +2,9 @@
 
 namespace Drupal\jsonapi\Normalizer\Value;
 
+use Drupal\Core\Url;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
+
 /**
  * Class DocumentRootNormalizerValue.
  *
@@ -38,6 +41,13 @@ class DocumentRootNormalizerValue implements DocumentRootNormalizerValueInterfac
   protected $isCollection;
 
   /**
+   * The link manager.
+   *
+   * @var \Drupal\jsonapi\LinkManager\LinkManagerInterface
+   */
+  protected $linkManager;
+
+  /**
    * Instantiates a DocumentRootNormalizerValue object.
    *
    * @param \Drupal\Core\Entity\EntityInterface[] $values
@@ -45,13 +55,17 @@ class DocumentRootNormalizerValue implements DocumentRootNormalizerValueInterfac
    *   collection of entities.
    * @param array $context
    *   The context.
-   * @param bool $is_list
+   * @param bool $is_collection
    *   TRUE if this is a serialization for a list.
+   * @param array $link_context
+   *   All the objects and variables needed to generate the links for this
+   *   relationship.
    */
-  public function __construct(array $values, array $context, $is_collection = FALSE) {
+  public function __construct(array $values, array $context, $is_collection = FALSE, array $link_context) {
     $this->values = $values;
     $this->context = $context;
     $this->isCollection = $is_collection;
+    $this->linkManager = $link_context['link_manager'];
     // Get an array of arrays of includes.
     $this->includes = array_map(function ($value) {
       return $value->getIncludes();
@@ -79,6 +93,15 @@ class DocumentRootNormalizerValue implements DocumentRootNormalizerValueInterfac
     $rasterized['data'] = $this->isCollection ?
       $rasterized['data'] :
       reset($rasterized['data']);
+
+    // Add the self link.
+    if ($this->context['request']) {
+      /* @var \Symfony\Component\HttpFoundation\Request $request */
+      $request = $this->context['request'];
+      $rasterized['links'] = [
+        'self' => $this->linkManager->getRequestLink($request),
+      ];
+    }
     return $rasterized;
   }
 
diff --git a/src/Normalizer/Value/EntityReferenceNormalizerValue.php b/src/Normalizer/Value/EntityReferenceNormalizerValue.php
index 239a68e..0cc43f1 100644
--- a/src/Normalizer/Value/EntityReferenceNormalizerValue.php
+++ b/src/Normalizer/Value/EntityReferenceNormalizerValue.php
@@ -10,12 +10,49 @@ namespace Drupal\jsonapi\Normalizer\Value;
 class EntityReferenceNormalizerValue extends FieldNormalizerValue implements EntityReferenceNormalizerValueInterface {
 
   /**
+   * The link manager.
+   *
+   * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface
+   */
+  protected $linkManager;
+
+  /**
+   * The resource config for the link generation.
+   *
+   * @var \Drupal\jsonapi\Configuration\ResourceConfigInterface
+   */
+  protected $resourceConfig;
+
+  /**
+   * The field name for the link generation.
+   *
+   * @var string
+   */
+  protected $fieldName;
+
+  /**
+   * The entity ID for the host entity.
+   *
+   * @var string
+   */
+  protected $hostEntityId;
+
+  /**
    * Instantiate a EntityReferenceNormalizerValue object.
    *
    * @param EntityReferenceItemNormalizerValue[] $values
    *   The normalized result.
+   * @param int $cardinality
+   *   The number of fields for the field list.
+   * @param array $link_context
+   *   All the objects and variables needed to generate the links for this
+   *   relationship.
    */
-  public function __construct(array $values, $cardinality) {
+  public function __construct(array $values, $cardinality, array $link_context) {
+    $this->hostEntityId = $link_context['host_entity_id'];
+    $this->fieldName = $link_context['field_name'];
+    $this->linkManager = $link_context['link_manager'];
+    $this->resourceConfig = $link_context['resource_config'];
     array_walk($values, function ($field_item_value) {
       if (!$field_item_value instanceof EntityReferenceItemNormalizerValueInterface) {
         throw new \RuntimeException(sprintf('Unexpected normalizer item value for this %s.', get_called_class()));
@@ -31,10 +68,26 @@ class EntityReferenceNormalizerValue extends FieldNormalizerValue implements Ent
     if (!$value = parent::rasterizeValue()) {
       // According to the JSON API specs empty relationships are either NULL or
       // an empty array.
-      $value = $this->cardinality == 1 ? NULL : [];
+      return $this->cardinality == 1 ? ['data' => NULL] : ['data' => []];
     }
+    // Generate the links for the relationship.
+    $route_parameters = ['related' => $this->fieldName];
     return [
       'data' => $value,
+      'links' => [
+        'self' => $this->linkManager->getEntityLink(
+          $this->hostEntityId,
+          $this->resourceConfig,
+          $route_parameters,
+          'relationship'
+        ),
+        'related' => $this->linkManager->getEntityLink(
+          $this->hostEntityId,
+          $this->resourceConfig,
+          $route_parameters,
+          'related'
+        ),
+      ],
     ];
   }
 
diff --git a/tests/src/Kernel/Normalizer/DocumentRootNormalizerTest.php b/tests/src/Kernel/Normalizer/DocumentRootNormalizerTest.php
index 5067bc1..222b0ea 100644
--- a/tests/src/Kernel/Normalizer/DocumentRootNormalizerTest.php
+++ b/tests/src/Kernel/Normalizer/DocumentRootNormalizerTest.php
@@ -2,11 +2,13 @@
 
 namespace Drupal\Tests\jsonapi\Kernel\Normalizer;
 
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 use Drupal\jsonapi\Resource\DocumentWrapper;
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
 use Drupal\user\Entity\User;
+use Prophecy\Argument;
 use Symfony\Component\HttpFoundation\ParameterBag;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Route;
@@ -75,6 +77,15 @@ class DocumentRootNormalizerTest extends KernelTestBase {
     ]);
 
     $this->node->save();
+
+    $link_manager = $this->prophesize(LinkManagerInterface::class);
+    $link_manager
+      ->getEntityLink(Argument::any(), Argument::any(), Argument::type('array'), Argument::type('string'))
+      ->willReturn('dummy_entity_link');
+    $link_manager
+      ->getRequestLink(Argument::any())
+      ->willReturn('dummy_document_link');
+    $this->container->set('jsonapi.link_manager', $link_manager->reveal());
   }
 
 
@@ -102,6 +113,7 @@ class DocumentRootNormalizerTest extends KernelTestBase {
       'user' => 'name',
     ]);
     $query->get('include')->willReturn('uid');
+    $query->getIterator()->willReturn(new \ArrayIterator());
     $request->query = $query->reveal();
     $route = $this->prophesize(Route::class);
     $route->getPath()->willReturn('/node/{node}');
@@ -122,6 +134,10 @@ class DocumentRootNormalizerTest extends KernelTestBase {
         'type' => 'user',
         'id' => $this->user->id(),
       ],
+      'links' => [
+        'self' => 'dummy_entity_link',
+        'related' => 'dummy_entity_link',
+      ],
     ], $normalized['data']['relationships']['uid']);
     $this->assertEquals($this->user->id(), $normalized['included'][0]['data']['id']);
     $this->assertEquals('user', $normalized['included'][0]['data']['type']);
diff --git a/tests/src/Unit/Normalizer/Value/ContentEntityNormalizerValueTest.php b/tests/src/Unit/Normalizer/Value/ContentEntityNormalizerValueTest.php
index b571426..e745e8c 100644
--- a/tests/src/Unit/Normalizer/Value/ContentEntityNormalizerValueTest.php
+++ b/tests/src/Unit/Normalizer/Value/ContentEntityNormalizerValueTest.php
@@ -6,12 +6,12 @@ use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Url;
 use Drupal\jsonapi\Configuration\ResourceConfigInterface;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 use Drupal\jsonapi\Normalizer\Value\ContentEntityNormalizerValue;
 use Drupal\jsonapi\Normalizer\Value\ContentEntityNormalizerValueInterface;
 use Drupal\jsonapi\Normalizer\Value\DocumentRootNormalizerValueInterface;
 use Drupal\jsonapi\Normalizer\Value\EntityReferenceNormalizerValueInterface;
 use Drupal\jsonapi\Normalizer\Value\FieldNormalizerValueInterface;
-use Drupal\rest\LinkManager\LinkManagerInterface;
 use Drupal\Tests\UnitTestCase;
 use Prophecy\Argument;
 
@@ -83,20 +83,15 @@ class ContentEntityNormalizerValueTest extends UnitTestCase{
     $entity->isNew()->willReturn(FALSE);
     $entity->getEntityTypeId()->willReturn('node');
     $entity->bundle()->willReturn('article');
-    $entity->hasLinkTemplate(Argument::type('string'))->willReturn(TRUE);
-    $url = $this->prophesize(Url::class);
-    $url->toString()->willReturn('dummy_entity_link');
-    $url->setRouteParameter(Argument::any(), Argument::any())->willReturn($url->reveal());
-    $entity->toUrl(Argument::type('string'), Argument::type('array'))->willReturn($url->reveal());
     $link_manager = $this->prophesize(LinkManagerInterface::class);
-    $link_manager->getTypeUri(Argument::type('string'), Argument::type('string'), Argument::type('array'))->willReturn('dummy_type_link');
-    $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
+    $link_manager
+      ->getEntityLink(Argument::any(), Argument::any(), Argument::type('array'), Argument::type('string'))
+      ->willReturn('dummy_entity_link');
     $this->object = new ContentEntityNormalizerValue(
       ['title' => $field1->reveal(), 'field_related' => $field2->reveal()],
       $context,
       $entity->reveal(),
-      $link_manager->reveal(),
-      $entity_type_manager->reveal()
+      ['link_manager' => $link_manager->reveal()]
     );
   }
 
@@ -114,7 +109,6 @@ class ContentEntityNormalizerValueTest extends UnitTestCase{
       ],
       'links' => [
         'self' => 'dummy_entity_link',
-        'type' => 'dummy_type_link',
       ],
     ], $this->object->rasterizeValue());
   }
diff --git a/tests/src/Unit/Normalizer/Value/DocumentRootNormalizerValueTest.php b/tests/src/Unit/Normalizer/Value/DocumentRootNormalizerValueTest.php
index b4d48da..e599adc 100644
--- a/tests/src/Unit/Normalizer/Value/DocumentRootNormalizerValueTest.php
+++ b/tests/src/Unit/Normalizer/Value/DocumentRootNormalizerValueTest.php
@@ -3,16 +3,13 @@
 namespace Drupal\Tests\jsonapi\Unit\Normalizer\Value;
 
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Url;
 use Drupal\jsonapi\Configuration\ResourceConfigInterface;
-use Drupal\jsonapi\Normalizer\Value\ContentEntityNormalizerValue;
-use Drupal\jsonapi\Normalizer\Value\ContentEntityNormalizerValueInterface;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 use Drupal\jsonapi\Normalizer\Value\DocumentRootNormalizerValue;
 use Drupal\jsonapi\Normalizer\Value\DocumentRootNormalizerValueInterface;
 use Drupal\jsonapi\Normalizer\Value\EntityReferenceNormalizerValueInterface;
 use Drupal\jsonapi\Normalizer\Value\FieldNormalizerValueInterface;
-use Drupal\rest\LinkManager\LinkManagerInterface;
 use Drupal\Tests\UnitTestCase;
 use Prophecy\Argument;
 
@@ -90,14 +87,14 @@ class DocumentRootNormalizerValueTest extends UnitTestCase{
     $url->setRouteParameter(Argument::any(), Argument::any())->willReturn($url->reveal());
     $entity->toUrl(Argument::type('string'), Argument::type('array'))->willReturn($url->reveal());
     $link_manager = $this->prophesize(LinkManagerInterface::class);
-    $link_manager->getTypeUri(Argument::type('string'), Argument::type('string'), Argument::type('array'))->willReturn('dummy_type_link');
-    $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
+    $link_manager
+      ->getEntityLink(Argument::any(), Argument::any(), Argument::type('array'), Argument::type('string'))
+      ->willReturn('dummy_entity_link');
     $this->object = new DocumentRootNormalizerValue(
       ['title' => $field1->reveal(), 'field_related' => $field2->reveal()],
       $context,
       $entity->reveal(),
-      $link_manager->reveal(),
-      $entity_type_manager->reveal()
+      ['link_manager' => $link_manager->reveal()]
     );
   }
 
diff --git a/tests/src/Unit/Normalizer/Value/EntityReferenceNormalizerValueTest.php b/tests/src/Unit/Normalizer/Value/EntityReferenceNormalizerValueTest.php
index 295949e..2a9b163 100644
--- a/tests/src/Unit/Normalizer/Value/EntityReferenceNormalizerValueTest.php
+++ b/tests/src/Unit/Normalizer/Value/EntityReferenceNormalizerValueTest.php
@@ -2,10 +2,13 @@
 
 namespace Drupal\Tests\jsonapi\Unit\Normalizer\Value;
 
+use Drupal\jsonapi\Configuration\ResourceConfigInterface;
+use Drupal\jsonapi\LinkManager\LinkManagerInterface;
 use Drupal\jsonapi\Normalizer\Value\EntityReferenceItemNormalizerValue;
 use Drupal\jsonapi\Normalizer\Value\EntityReferenceNormalizerValue;
 use Drupal\jsonapi\Normalizer\Value\FieldItemNormalizerValue;
 use Drupal\Tests\UnitTestCase;
+use Prophecy\Argument;
 
 /**
  * Class EntityReferenceNormalizerValueTes.
@@ -22,7 +25,16 @@ class EntityReferenceNormalizerValueTest extends UnitTestCase {
    * @dataProvider rasterizeValueProvider
    */
   public function testRasterizeValue($values, $cardinality, $expected) {
-    $object = new EntityReferenceNormalizerValue($values, $cardinality);
+    $link_manager = $this->prophesize(LinkManagerInterface::class);
+    $link_manager
+      ->getEntityLink(Argument::any(), Argument::any(), Argument::type('array'), Argument::type('string'))
+      ->willReturn('dummy_entity_link');
+    $object = new EntityReferenceNormalizerValue($values, $cardinality, [
+      'link_manager' => $link_manager->reveal(),
+      'host_entity_id' => 'lorem',
+      'resource_config' => $this->prophesize(ResourceConfigInterface::class)->reveal(),
+      'field_name' => 'ipsum',
+    ]);
     $this->assertEquals($expected, $object->rasterizeValue());
   }
 
@@ -37,14 +49,22 @@ class EntityReferenceNormalizerValueTest extends UnitTestCase {
     $uid2 = $this->prophesize(EntityReferenceItemNormalizerValue::class);
     $uid2->rasterizeValue()->willReturn(['type' => 'user', 'id' => $uid_raw]);
     $uid2->getInclude()->willReturn(NULL);
+    $links = [
+      'self' => 'dummy_entity_link',
+      'related' => 'dummy_entity_link',
+    ];
     return [
-      [[$uid1->reveal()], 1, ['data' => ['type' => 'user', 'id' => 1]]],
+      [[$uid1->reveal()], 1, [
+        'data' => ['type' => 'user', 'id' => 1],
+        'links' => $links,
+      ]],
       [
         [$uid1->reveal(), $uid2->reveal()], 2, [
           'data' => [
             ['type' => 'user', 'id' => 1],
             ['type' => 'user', 'id' => 2],
           ],
+          'links' => $links,
         ],
       ],
     ];
@@ -59,7 +79,16 @@ class EntityReferenceNormalizerValueTest extends UnitTestCase {
     $uid1 = $this->prophesize(FieldItemNormalizerValue::class);
     $uid1->rasterizeValue()->willReturn(1);
     $uid1->getInclude()->willReturn(NULL);
-    $object = new EntityReferenceNormalizerValue([$uid1->reveal()], 1);
+    $link_manager = $this->prophesize(LinkManagerInterface::class);
+    $link_manager
+      ->getEntityLink(Argument::any(), Argument::any(), Argument::type('array'), Argument::type('string'))
+      ->willReturn('dummy_entity_link');
+    $object = new EntityReferenceNormalizerValue([$uid1->reveal()], 1, [
+      'link_manager' => $link_manager->reveal(),
+      'host_entity_id' => 'lorem',
+      'resource_config' => $this->prophesize(ResourceConfigInterface::class)->reveal(),
+      'field_name' => 'ipsum',
+    ]);
     $object->rasterizeValue();
     // If the exception was not thrown, then the following fails.
     $this->assertTrue(FALSE);
