diff --git a/tests/src/Functional/InternalEntitiesTest.php b/tests/src/Functional/InternalEntitiesTest.php
index 9a0ac98..aa3085e 100644
--- a/tests/src/Functional/InternalEntitiesTest.php
+++ b/tests/src/Functional/InternalEntitiesTest.php
@@ -38,6 +38,13 @@ class InternalEntitiesTest extends BrowserTestBase {
    */
   protected $testUser;
 
+  /**
+   * An entity of an internal entity type.
+   *
+   * @var \Drupal\Core\Entity\EntityInterface
+   */
+  protected $internalEntity;
+
   /**
    * An entity referencing an internal entity.
    *
@@ -66,16 +73,49 @@ class InternalEntitiesTest extends BrowserTestBase {
       'Internal Entities',
       'jsonapi_entity_test_no_label'
     );
-    $internal_entity = EntityTestNoLabel::create([]);
-    $internal_entity->save();
+    $this->internalEntity = EntityTestNoLabel::create([]);
+    $this->internalEntity->save();
     $this->referencingEntity = EntityTestWithBundle::create([
       'type' => 'internal_referencer',
-      'field_internal' => $internal_entity->id(),
+      'field_internal' => $this->internalEntity->id(),
     ]);
     $this->referencingEntity->save();
     drupal_flush_all_caches();
   }
 
+  /**
+   * Ensures that internal resources types aren't present in the routes.
+   */
+  public function testRoutes() {
+    if (!method_exists(EntityTypeInterface::class, 'isInternal')) {
+      $this->markTestSkipped('The Drupal Core version must be >= 8.5');
+      return;
+    }
+    $this->drupalLogin($this->testUser);
+    $internal_entity_type_id = $this->internalEntity->getEntityTypeId();
+    $internal_bundle = $this->internalEntity->bundle();
+    $internal_uuid = $this->internalEntity->uuid();
+    $referencing_entity_type_id = $this->referencingEntity->getEntityTypeId();
+    $referencing_bundle = $this->referencingEntity->bundle();
+    $referencing_uuid = $this->referencingEntity->uuid();
+    // This cannot be in a data provider because it needs values created by the
+    // setUp method.
+    $paths = [
+      'individual' => "/jsonapi/{$internal_entity_type_id}/{$internal_bundle}/{$internal_uuid}",
+      'collection' => "/jsonapi/{$internal_entity_type_id}/{$internal_bundle}",
+      'related' => "/jsonapi/{$referencing_entity_type_id}/{$referencing_bundle}/{$referencing_uuid}/field_internal",
+    ];
+    foreach ($paths as $type => $path) {
+      $response = $this->drupalGet($path, [], ['Accept' => 'application/vnd.api+json']);
+      $decoded = Json::decode($response);
+      $this->assertEquals(
+        404,
+        $decoded['errors'][0]['status'],
+        "The '{$type}' route ({$path}) should not be available for internal resource types.'"
+      );
+    }
+  }
+
   /**
    * Asserts that internal entities are not included in compound documents.
    */
@@ -88,7 +128,7 @@ class InternalEntitiesTest extends BrowserTestBase {
     $entity_type_id = $this->referencingEntity->getEntityTypeId();
     $bundle = $this->referencingEntity->bundle();
     $path = "/jsonapi/{$entity_type_id}/{$bundle}/{$this->referencingEntity->uuid()}?include=field_internal";
-    $response = $this->drupalGet($path);
+    $response = $this->drupalGet($path, [], ['Accept' => 'application/vnd.api+json']);
     $decoded = Json::decode($response);
     $this->assertArrayNotHasKey(
       'included',
diff --git a/tests/src/Kernel/Controller/EntityResourceTest.php b/tests/src/Kernel/Controller/EntityResourceTest.php
index c5cdc1f..b753dd0 100644
--- a/tests/src/Kernel/Controller/EntityResourceTest.php
+++ b/tests/src/Kernel/Controller/EntityResourceTest.php
@@ -26,6 +26,7 @@ use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
 use Symfony\Component\HttpKernel\Exception\HttpException;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\Routing\Route;
 
 /**
@@ -403,7 +404,11 @@ class EntityResourceTest extends JsonapiKernelTestBase {
    */
   public function testGetRelated() {
     // to-one relationship.
-    $entity_resource = $this->buildEntityResource('node', 'article');
+    $entity_resource = $this->buildEntityResource('node', 'article', [
+      'uid' => [new ResourceType('user', 'user', NULL)],
+      'roles' => [new ResourceType('user_role', 'user_role', NULL)],
+      'field_relationships' => [new ResourceType('node', 'article', NULL)],
+    ]);
     $response = $entity_resource->getRelated($this->node, 'uid', new Request());
     $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
     $this->assertInstanceOf(User::class, $response->getResponseData()
@@ -445,7 +450,9 @@ class EntityResourceTest extends JsonapiKernelTestBase {
    */
   public function testGetRelationship() {
     // to-one relationship.
-    $entity_resource = $this->buildEntityResource('node', 'article');
+    $entity_resource = $this->buildEntityResource('node', 'article', [
+      'uid' => [new ResourceType('user', 'user', NULL)],
+    ]);
     $response = $entity_resource->getRelationship($this->node, 'uid', new Request());
     $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
     $this->assertInstanceOf(
@@ -744,7 +751,9 @@ class EntityResourceTest extends JsonapiKernelTestBase {
       ->grantPermission('edit any article content')
       ->save();
 
-    $entity_resource = $this->buildEntityResource('node', 'article');
+    $entity_resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [new ResourceType('node', 'article', NULL)],
+    ]);
     $response = $entity_resource->createRelationship($this->node, 'field_relationships', $parsed_field_list, new Request());
 
     // As a side effect, the node will also be saved.
@@ -771,7 +780,9 @@ class EntityResourceTest extends JsonapiKernelTestBase {
       ->grantPermission('edit any article content')
       ->save();
 
-    $entity_resource = $this->buildEntityResource('node', 'article');
+    $entity_resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [new ResourceType('node', 'article', NULL)],
+    ]);
     $response = $entity_resource->patchRelationship($this->node, 'field_relationships', $parsed_field_list, new Request());
 
     // As a side effect, the node will also be saved.
@@ -814,7 +825,9 @@ class EntityResourceTest extends JsonapiKernelTestBase {
       ->grantPermission('edit any article content')
       ->save();
 
-    $entity_resource = $this->buildEntityResource('node', 'article');
+    $entity_resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [new ResourceType('node', 'article', NULL)],
+    ]);
     $response = $entity_resource->deleteRelationship($this->node, 'field_relationships', $parsed_field_list, new Request());
 
     // As a side effect, the node will also be saved.
@@ -826,6 +839,86 @@ class EntityResourceTest extends JsonapiKernelTestBase {
     $this->assertEquals(201, $response->getStatusCode());
   }
 
+  /**
+   * @covers ::getRelated
+   */
+  public function testGetRelatedInternal() {
+    $internal_resource_type = new ResourceType('node', 'article', NULL, TRUE);
+    $resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [$internal_resource_type],
+    ]);
+
+    $this->setExpectedException(NotFoundHttpException::class);
+    $resource->getRelationship($this->node, 'field_relationships', new Request());
+  }
+
+  /**
+   * @covers ::getRelationship
+   */
+  public function testGetRelationshipInternal() {
+    $internal_resource_type = new ResourceType('node', 'article', NULL, TRUE);
+    $resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [$internal_resource_type],
+    ]);
+
+    $this->setExpectedException(NotFoundHttpException::class);
+    $resource->getRelationship($this->node, 'field_relationships', new Request());
+  }
+
+  /**
+   * @covers ::createRelationship
+   */
+  public function testCreateRelationshipInternal() {
+    $internal_resource_type = new ResourceType('node', 'article', NULL, TRUE);
+    $resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [$internal_resource_type],
+    ]);
+
+    Role::load(Role::ANONYMOUS_ID)->grantPermission('edit any article content')->save();
+
+    $field_type_manager = $this->container->get('plugin.manager.field.field_type');
+    $list = $field_type_manager->createFieldItemList($this->node, 'field_relationships');
+
+    $this->setExpectedException(NotFoundHttpException::class);
+    $resource->createRelationship($this->node, 'field_relationships', $list, new Request());
+  }
+
+  /**
+   * @covers ::patchRelationship
+   */
+  public function testPatchRelationshipInternal() {
+    $internal_resource_type = new ResourceType('node', 'article', NULL, TRUE);
+    $resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [$internal_resource_type],
+    ]);
+
+    Role::load(Role::ANONYMOUS_ID)->grantPermission('edit any article content')->save();
+
+    $field_type_manager = $this->container->get('plugin.manager.field.field_type');
+    $list = $field_type_manager->createFieldItemList($this->node, 'field_relationships');
+
+    $this->setExpectedException(NotFoundHttpException::class);
+    $resource->patchRelationship($this->node, 'field_relationships', $list, new Request());
+  }
+
+  /**
+   * @covers ::deleteRelationship
+   */
+  public function testDeleteRelationshipInternal() {
+    $internal_resource_type = new ResourceType('node', 'article', NULL, TRUE);
+    $resource = $this->buildEntityResource('node', 'article', [
+      'field_relationships' => [$internal_resource_type],
+    ]);
+
+    Role::load(Role::ANONYMOUS_ID)->grantPermission('edit any article content')->save();
+
+    $field_type_manager = $this->container->get('plugin.manager.field.field_type');
+    $list = $field_type_manager->createFieldItemList($this->node, 'field_relationships');
+
+    $this->setExpectedException(NotFoundHttpException::class);
+    $resource->deleteRelationship($this->node, 'field_relationships', $list, new Request());
+  }
+
   /**
    * Provides data for the testDeleteRelationship.
    *
@@ -850,11 +943,15 @@ class EntityResourceTest extends JsonapiKernelTestBase {
    *   The entity type ID.
    * @param string $bundle
    *   The bundle.
+   * @param array $relatable_resource_types
+   *   An array of relatable resource types, keyed by field.
+   * @param bool $internal
+   *   Whether the primary resource type is internal.
    *
    * @return \Drupal\jsonapi\Controller\EntityResource
    *   The resource.
    */
-  protected function buildEntityResource($entity_type_id, $bundle) {
+  protected function buildEntityResource($entity_type_id, $bundle, $relatable_resource_types = [], $internal = FALSE) {
     // The fake route.
     $route = new Route(NULL, [], [
       '_entity_type' => $entity_type_id,
@@ -872,8 +969,11 @@ class EntityResourceTest extends JsonapiKernelTestBase {
     );
     $this->container->set('jsonapi.current_context', $current_context);
 
+    $resource_type = new ResourceType($entity_type_id, $bundle, NULL, $internal);
+    $resource_type->setRelatableResourceTypes($relatable_resource_types);
+
     return new EntityResource(
-      new ResourceType($entity_type_id, $bundle, NULL),
+      $resource_type,
       $this->container->get('entity_type.manager'),
       $this->container->get('entity_field.manager'),
       $current_context,
diff --git a/tests/src/Kernel/Controller/EntryPointTest.php b/tests/src/Kernel/Controller/EntryPointTest.php
index 25ebd83..7e71bff 100644
--- a/tests/src/Kernel/Controller/EntryPointTest.php
+++ b/tests/src/Kernel/Controller/EntryPointTest.php
@@ -4,6 +4,8 @@ namespace Drupal\Tests\jsonapi\Kernel\Controller;
 
 use Drupal\Core\Cache\CacheableJsonResponse;
 use Drupal\jsonapi\Controller\EntryPoint;
+use Drupal\jsonapi\ResourceType\ResourceType;
+use Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface;
 use Drupal\Tests\jsonapi\Kernel\JsonapiKernelTestBase;
 
 /**
@@ -27,24 +29,72 @@ class EntryPointTest extends JsonapiKernelTestBase {
   ];
 
   /**
-   * @covers ::index
+   * The subject under test.
+   *
+   * @var \Drupal\jsonapi\Controller\EntryPoint
+   */
+  protected $entryPoint;
+
+  /**
+   * {@inheritdoc}
    */
-  public function testIndex() {
-    $controller = new EntryPoint(
-      \Drupal::service('jsonapi.resource_type.repository'),
+  public function setUp() {
+    parent::setUp();
+    $resource_repository = $this->prophesize(ResourceTypeRepositoryInterface::class);
+    $resource_repository->all()->willReturn([
+      new ResourceType('user', 'user', NULL),
+      new ResourceType('node_type', 'node_type', NULL),
+      new ResourceType('menu', 'menu', NULL, TRUE),
+    ]);
+    $this->entryPoint = new EntryPoint(
+      $resource_repository->reveal(),
       \Drupal::service('renderer'),
       new CacheableJsonResponse()
     );
-    $processed_response = $controller->index();
-    $this->assertEquals(
+  }
+
+  /**
+   * @covers ::index
+   *
+   * @param string $path
+   *   The regular expression which should validate the link.
+   * @param string $link
+   *   The link key to test.
+   *
+   * @dataProvider indexProvider
+   */
+  public function testIndex($path, $link) {
+    $data = json_decode($this->entryPoint->index()->getContent(), TRUE);
+    $this->assertRegExp($path, $data['links'][$link]);
+  }
+
+  /**
+   * Provides test cases to test entry point route generation.
+   */
+  public function indexProvider() {
+    return [
+      'root' => ['path' => '/.*\/jsonapi/', 'link' => 'self'],
+      'user' => ['path' => '/.*\/jsonapi\/user\/user/', 'link' => 'user--user'],
+      'node_type' => ['path' => '/.*\/jsonapi\/node_type\/node_type/', 'link' => 'node_type--node_type'],
+    ];
+  }
+
+  /**
+   * Ensures that internal resources are not present in the entry point.
+   */
+  public function testInternalResource() {
+    $data = json_decode($this->entryPoint->index()->getContent(), TRUE);
+    $this->assertArrayNotHasKey('menu--menu', $data['links']);
+  }
+
+  /**
+   * Ensures that the site name cache context was added.
+   */
+  public function testCacheContext() {
+    $this->assertArraySubset(
       ['url.site'],
-      $processed_response->getCacheableMetadata()->getCacheContexts()
+      $this->entryPoint->index()->getCacheableMetadata()->getCacheContexts()
     );
-    $data = json_decode($processed_response->getContent(), TRUE);
-    $links = $data['links'];
-    $this->assertRegExp('/.*\/jsonapi/', $links['self']);
-    $this->assertRegExp('/.*\/jsonapi\/user\/user/', $links['user--user']);
-    $this->assertRegExp('/.*\/jsonapi\/node_type\/node_type/', $links['node_type--node_type']);
   }
 
 }
diff --git a/tests/src/Unit/Routing/RoutesTest.php b/tests/src/Unit/Routing/RoutesTest.php
index f6b2899..5a4396f 100644
--- a/tests/src/Unit/Routing/RoutesTest.php
+++ b/tests/src/Unit/Routing/RoutesTest.php
@@ -31,11 +31,22 @@ class RoutesTest extends UnitTestCase {
    */
   protected function setUp() {
     parent::setUp();
+    $type_1 = new ResourceType('entity_type_1', 'bundle_1_1', EntityInterface::class);
+    $type_2 = new ResourceType('entity_type_2', 'bundle_2_1', EntityInterface::class, TRUE);
+    $relatable_resource_types = [
+      'external' => [$type_1],
+      'internal' => [$type_2],
+      'both' => [$type_1, $type_2],
+    ];
+    $type_1->setRelatableResourceTypes($relatable_resource_types);
+    $type_2->setRelatableResourceTypes($relatable_resource_types);
+    // This type ensures that we can create routes for bundle IDs which might be
+    // cast from strings to integers.  It should not affect related resource
+    // routing.
+    $type_3 = new ResourceType('entity_type_3', '123', EntityInterface::class, TRUE);
+    $type_3->setRelatableResourceTypes([]);
     $resource_type_repository = $this->prophesize(ResourceTypeRepository::class);
-    $resource_type_repository->all()->willReturn([
-      new ResourceType('entity_type_1', 'bundle_1_1', EntityInterface::class),
-      new ResourceType('entity_type_2', 123, EntityInterface::class),
-    ]);
+    $resource_type_repository->all()->willReturn([$type_1, $type_2, $type_3]);
     $container = $this->prophesize(ContainerInterface::class);
     $container->get('jsonapi.resource_type.repository')->willReturn($resource_type_repository->reveal());
     $auth_collector = $this->prophesize(AuthenticationCollectorInterface::class);
@@ -55,8 +66,8 @@ class RoutesTest extends UnitTestCase {
     // Get the route collection and start making assertions.
     $routes = $this->routes['ok']->routes();
 
-    // Make sure that there are 4 routes for each resource (2*4).
-    $this->assertEquals(8, $routes->count());
+    // Make sure that there are 4 routes for the non-internal resource.
+    $this->assertEquals(4, $routes->count());
 
     $iterator = $routes->getIterator();
     // Check the collection route.
@@ -130,4 +141,46 @@ class RoutesTest extends UnitTestCase {
     $this->assertSame('Drupal\Core\Field\EntityReferenceFieldItemList', $route->getOption('serialization_class'));
   }
 
+  /**
+   * Ensures that the expected routes are created or not created.
+   *
+   * @dataProvider expectedRoutes
+   */
+  public function testRoutes($route) {
+    $this->assertArrayHasKey($route, $this->routes['ok']->routes()->all());
+  }
+
+  /**
+   * Lists routes which should have been created.
+   */
+  public function expectedRoutes() {
+    return [
+      ['jsonapi.entity_type_1--bundle_1_1.individual'],
+      ['jsonapi.entity_type_1--bundle_1_1.collection'],
+      ['jsonapi.entity_type_1--bundle_1_1.related'],
+      ['jsonapi.entity_type_1--bundle_1_1.relationship'],
+    ];
+  }
+
+  /**
+   * Ensures that no routes are created for internal resources.
+   *
+   * @dataProvider notExpectedRoutes
+   */
+  public function testInternalRoutes($route) {
+    $this->assertArrayNotHasKey($route, $this->routes['ok']->routes()->all());
+  }
+
+  /**
+   * Lists routes which should have been created.
+   */
+  public function notExpectedRoutes() {
+    return [
+      ['jsonapi.entity_type_2--bundle_2_1.individual'],
+      ['jsonapi.entity_type_2--bundle_2_1.collection'],
+      ['jsonapi.entity_type_2--bundle_2_1.related'],
+      ['jsonapi.entity_type_2--bundle_2_1.relationship'],
+    ];
+  }
+
 }
