diff --git a/autoload.info b/autoload.info
index ef45f1f..eb18651 100644
--- a/autoload.info
+++ b/autoload.info
@@ -3,5 +3,6 @@ description = PHP 5.3+ autoloader for objects.
 core = 7.x
 php = 5.3
 
+; For "autoload_test_entity".
 test_dependencies[] = entity
 test_dependencies[] = views
diff --git a/autoload.install b/autoload.install
index 30d7381..de04e3d 100644
--- a/autoload.install
+++ b/autoload.install
@@ -9,6 +9,5 @@
  * Implements hook_modules_enabled().
  */
 function autoload_modules_enabled() {
-  drupal_static_reset('autoload_paths');
-  $_SESSION['autoload_paths'] = autoload_paths();
+  autoload_paths_recompute();
 }
diff --git a/autoload.module b/autoload.module
index 8ef3192..1f74788 100644
--- a/autoload.module
+++ b/autoload.module
@@ -46,6 +46,21 @@ spl_autoload_register(function ($namespace) use ($autoload) {
 });
 
 /**
+ * Implements hook_views_api().
+ */
+function autoload_views_api() {
+  return array('api' => 3);
+}
+
+/**
+ * Recompute autoload paths.
+ */
+function autoload_paths_recompute() {
+  drupal_static_reset('autoload_paths');
+  $_SESSION['autoload_paths'] = autoload_paths();
+}
+
+/**
  * Collect autoloading maps.
  *
  * @return array[]
diff --git a/autoload.views.inc b/autoload.views.inc
new file mode 100644
index 0000000..042b4d4
--- /dev/null
+++ b/autoload.views.inc
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Views integration.
+ */
+
+/**
+ * Implements hook_views_data().
+ */
+function autoload_views_data() {
+  autoload_paths_recompute();
+
+  return array();
+}
diff --git a/src/Tests/Unit/EntityTest.php b/src/Tests/Unit/EntityTest.php
new file mode 100644
index 0000000..ec7482e
--- /dev/null
+++ b/src/Tests/Unit/EntityTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\autoload\Tests\Unit;
+
+/**
+ * Class EntityTest.
+ */
+class EntityTest extends AuxiliaryTest {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $modules = array('autoload_test_entity_ui');
+
+  /**
+   * {@inheritdoc}
+   */
+  public function test() {
+    // The next error must not appear:
+    // Error: Class 'Drupal\autoload_test_entity_ui\ViewsController' not found
+    // in entity_views_data() (line 31 of sites/all/modules/entity/views/entity.
+    // views.inc).
+  }
+
+}
diff --git a/tests/autoload_test_entity/autoload_test_entity.info b/tests/autoload_test_entity/autoload_test_entity.info
new file mode 100644
index 0000000..18e548b
--- /dev/null
+++ b/tests/autoload_test_entity/autoload_test_entity.info
@@ -0,0 +1,9 @@
+name = Autoload Entity Test
+description = Ensure that autoloading will work for controllers, provided by "entity" module.
+hidden = TRUE
+core = 7.x
+
+autoload = TRUE
+
+dependencies[] = autoload
+dependencies[] = entity
diff --git a/tests/autoload_test_entity/autoload_test_entity.install b/tests/autoload_test_entity/autoload_test_entity.install
new file mode 100644
index 0000000..8e7271d
--- /dev/null
+++ b/tests/autoload_test_entity/autoload_test_entity.install
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Module installation and updates.
+ */
+
+/**
+ * Implements hook_schema().
+ */
+function autoload_test_entity_schema() {
+  $schema = array();
+
+  $schema['autoload_test_entity'] = array(
+    'description' => 'Autoload Test Entity',
+    'fields' => array(
+      'id' => array(
+        'type' => 'serial',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'The primary identifier.',
+      ),
+    ),
+    'primary key' => array('id'),
+  );
+
+  return $schema;
+}
diff --git a/tests/autoload_test_entity/autoload_test_entity.module b/tests/autoload_test_entity/autoload_test_entity.module
new file mode 100644
index 0000000..db56197
--- /dev/null
+++ b/tests/autoload_test_entity/autoload_test_entity.module
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @file
+ * Autoload Entity Test.
+ */
+
+/**
+ * Implements hook_entity_info_alter().
+ */
+function autoload_test_entity_entity_info() {
+  $info = array();
+
+  $info['autoload_test_entity'] = array(
+    'label' => t('Autoload Test Entity'),
+    'base table' => 'autoload_test_entity',
+    'controller class' => 'EntityAPIController',
+    'entity keys' => array('id' => 'id'),
+  );
+
+  return $info;
+}
diff --git a/tests/autoload_test_entity/modules/autoload_test_entity_ui/autoload_test_entity_ui.info b/tests/autoload_test_entity/modules/autoload_test_entity_ui/autoload_test_entity_ui.info
new file mode 100644
index 0000000..ea8d294
--- /dev/null
+++ b/tests/autoload_test_entity/modules/autoload_test_entity_ui/autoload_test_entity_ui.info
@@ -0,0 +1,8 @@
+name = Autoload Entity Test UI
+hidden = TRUE
+core = 7.x
+
+autoload = TRUE
+
+dependencies[] = autoload_test_entity
+dependencies[] = views
diff --git a/tests/autoload_test_entity/modules/autoload_test_entity_ui/autoload_test_entity_ui.module b/tests/autoload_test_entity/modules/autoload_test_entity_ui/autoload_test_entity_ui.module
new file mode 100644
index 0000000..fd40e12
--- /dev/null
+++ b/tests/autoload_test_entity/modules/autoload_test_entity_ui/autoload_test_entity_ui.module
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @file
+ * Autoload Entity Test UI.
+ */
+
+/**
+ * Implements hook_entity_info_alter().
+ */
+function autoload_test_entity_ui_entity_info_alter(array &$entity_info) {
+  $entity_info['autoload_test_entity']['views controller class'] = 'Drupal\autoload_test_entity_ui\ViewsController';
+}
diff --git a/tests/autoload_test_entity/modules/autoload_test_entity_ui/src/ViewsController.php b/tests/autoload_test_entity/modules/autoload_test_entity_ui/src/ViewsController.php
new file mode 100644
index 0000000..3072e89
--- /dev/null
+++ b/tests/autoload_test_entity/modules/autoload_test_entity_ui/src/ViewsController.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Drupal\autoload_test_entity_ui;
+
+/**
+ * Test controller for checking its ability to be autoloaded.
+ */
+class ViewsController extends \EntityDefaultViewsController {
+
+}
