diff --git a/contrib/current_search/current_search.module b/contrib/current_search/current_search.module
index 9fe0ed4..1401448 100644
--- a/contrib/current_search/current_search.module
+++ b/contrib/current_search/current_search.module
@@ -43,7 +43,6 @@ function current_search_menu_alter(&$items) {
  */
 function current_search_theme() {
   module_load_include('php', 'ctools', 'plugins/export_ui/ctools_export_ui.class');
-  autoload_class('ctools_export_ui');
   return array(
     'current_search_group_title' => array(
       'arguments' => array('title' => NULL),
diff --git a/facetapi.admin.inc b/facetapi.admin.inc
index 26ddb38..1761b97 100644
--- a/facetapi.admin.inc
+++ b/facetapi.admin.inc
@@ -321,15 +321,18 @@ function facetapi_get_widgets(array $realm, array $facet) {
 
   // Iterates over all defined plugins, initializes requirements.
   foreach (ctools_get_plugins('facetapi', 'widgets') as $id => $plugin) {
-    $plugin['handler'] += array(
-      'requirements' => array(
-        'facetapi_requirement_realm_property' => array('element type' => 'links')
-      ),
-    );
+    //Exclude abstract classes
+    if(!isset($plugin['handler']['abstract']) || !$plugin['handler']['abstract']) {
+      $plugin['handler'] += array(
+        'requirements' => array(
+          'facetapi_requirement_realm_property' => array('element type' => 'links')
+        ),
+      );
 
-    // Checks requirements, only saves widgets that pass all requirements.
-    if (facetapi_check_requirements($plugin['handler']['requirements'], $realm, $facet)) {
-      $plugins[$id] = $plugin;
+      // Checks requirements, only saves widgets that pass all requirements.
+      if (facetapi_check_requirements($plugin['handler']['requirements'], $realm, $facet)) {
+        $plugins[$id] = $plugin;
+      }
     }
   }
 
@@ -502,10 +505,13 @@ function facetapi_facet_display_form(&$form_state, FacetapiAdapter $adapter, arr
 
   $empty_options = array();
   foreach (ctools_get_plugins('facetapi', 'empty_behaviors') as $id => $plugin) {
-    $empty_options[$id] = $plugin['handler']['label'];
-    $class = $plugin['handler']['class'];
-    $plugin = new $class($facet_settings);
-    $plugin->settingsForm($form, $form_state);
+    //Exclude abstract classes
+    if(!isset($plugin['handler']['abstract']) || !$plugin['handler']['abstract']) {
+      $empty_options[$id] = $plugin['handler']['label'];
+      $class = ctools_plugin_get_class($plugin, 'handler');
+      $plugin_instance = new $class($facet_settings);
+      $plugin_instance->settingsForm($form, $form_state);
+    }
   }
 
   $form['widget']['empty']['empty_behavior'] = array(
diff --git a/facetapi.facetapi.inc b/facetapi.facetapi.inc
index f5ce8a0..621716f 100644
--- a/facetapi.facetapi.inc
+++ b/facetapi.facetapi.inc
@@ -66,12 +66,45 @@ function facetapi_facetapi_sort_info() {
 /**
  * Implements hook_facetapi_widgets().
  */
+function facetapi_facetapi_adapters() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi/';
+  return array(
+    'adapter' => array(
+      'handler' => array(
+        'label' => t('Abstract class for adapters'),
+        'class' => 'FacetapiAdapter',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'adapter.inc',
+      ),
+    ),
+  );
+}
+
+/**
+ * Implements hook_facetapi_widgets().
+ */
+//TODO: why other naming convention?
 function facetapi_facetapi_widgets() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi';
   return array(
+    'facetapi_widget' => array(
+      'handler' => array(
+        'label' => t('Abstract class for widgets'),
+        'class' => 'FacetapiWidget',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'widget.inc',
+        'query types' => array('term', 'date'),
+      ),
+    ),
     'facetapi_links' => array(
       'handler' => array(
         'label' => t('Links'),
         'class' => 'FacetapiWidgetLinks',
+        'parent' => 'facetapi_widget',
+        'path' => $path,
+        'file' => 'widget_links.inc',
         'query types' => array('term', 'date'),
       ),
     ),
@@ -79,6 +112,9 @@ function facetapi_facetapi_widgets() {
       'handler' => array(
         'label' => t('Links with checkboxes'),
         'class' => 'FacetapiWidgetCheckboxLinks',
+        'parent' => 'facetapi_widget',
+        'path' => $path,
+        'file' => 'widget_links.inc',
         'query types' => array('term', 'date'),
       ),
     ),
@@ -89,38 +125,101 @@ function facetapi_facetapi_widgets() {
  * Implements hook_facetapi_filters().
  */
 function facetapi_facetapi_filters() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi';
   return array(
+    'filter' => array(
+      'handler' => array(
+        'label' => t('Abstract classs for filters'),
+        'class' => 'FacetapiFilter',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'filter.inc',
+      ),
+    ),
     'active_items' => array(
       'handler' => array(
         'label' => t('Do not display active items'),
         'class' => 'FacetapiFilterActiveItems',
+        'parent' => 'filter',
+        'path' => $path,
+        'file' => 'filter.inc', //not really needed since parent file will be included
       ),
     ),
     'current_depth' => array(
       'handler' => array(
         'label' => t('Only show items in the current level of the hierarchy'),
         'class' => 'FacetapiFilterCurrentDepth',
+        'parent' => 'filter',
+        'path' => $path,
+        'file' => 'filter.inc', //not really needed since parent file will be included
         'requirements' => array('facetapi_requirement_facet_hierarchical' => TRUE),
       ),
     ),
   );
 }
 
+function facetapi_facetapi_query_types() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi';
+  return array(
+    'query_type' => array(
+      'handler' => array(
+        'label' => t('Abstract classs for query types'),
+        'class' => 'FacetapiQueryType',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'query_type.inc',
+      ),
+    ),
+    'range' => array(
+      'handler' => array(
+        'label' => t('Range'),
+        'class' => 'FacetapiQueryTypeRange',
+        'path' => $path,
+        'file' => 'query_type.inc', //not really needed since parent file will be included
+      ),
+    ),
+    'date' => array(
+      'handler' => array(
+        'label' => t('Date'),
+        'class' => 'FacetapiQueryTypeDate',
+        'path' => $path,
+        'file' => 'query_type.inc', //not really needed since parent file will be included
+      ),
+    ),
+  );
+}
+
 /**
  * Implements hook_facetapi_dependencies().
  */
 function facetapi_facetapi_dependencies() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi';
   return array(
+    'dependency' => array(
+      'handler' => array(
+        'label' => t('Abstract class for dependencies'),
+        'class' => 'FacetapiDependency',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'dependency.inc',
+      ),
+    ),
     'bundle' => array(
       'handler' => array(
         'label' => t('Bundles'),
         'class' => 'FacetapiDependencyBundle',
+        'parent' => 'dependency',
+        'path' => $path,
+        'file' => 'dependency_bundle.inc',
       ),
     ),
     'role' => array(
       'handler' => array(
         'label' => t('Roles'),
         'class' => 'FacetapiDependencyRole',
+        'parent' => 'dependency',
+        'path' => $path,
+        'file' => 'dependency_role.inc',
       ),
     ),
   );
@@ -130,17 +229,33 @@ function facetapi_facetapi_dependencies() {
  * Implements hook_facetapi_empty_behaviors().
  */
 function facetapi_facetapi_empty_behaviors() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi';
   return array(
+    'empty_behavior' => array(
+      'handler' => array(
+        'label' => t('Abstract class for empty behaviors'),
+        'class' => 'FacetapiEmptyBehavior',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'empty_behavior.inc',
+      ),
+    ),
     'none' => array(
       'handler' => array(
         'label' => t('Do not display facet'),
         'class' => 'FacetapiEmptyBehaviorNone',
+        'parent' => 'empty_behavior',
+        'path' => $path,
+        'file' => 'empty_behavior.inc', //not really needed since parent file will be included
       ),
     ),
     'text' => array(
       'handler' => array(
         'label' => t('Display text'),
         'class' => 'FacetapiEmptyBehaviorText',
+        'parent' => 'empty_behavior',
+        'path' => $path,
+        'file' => 'empty_behavior_text.inc',
       ),
     ),
   );
@@ -150,11 +265,24 @@ function facetapi_facetapi_empty_behaviors() {
  * Implements hook_facetapi_url_processors().
  */
 function facetapi_facetapi_url_processors() {
+  $path = drupal_get_path('module', 'facetapi') . '/plugins/facetapi';
   return array(
+    'url_processor' => array(
+      'handler' => array(
+        'label' => t('Abstract URL processor'),
+        'class' => 'FacetapiUrlProcessor',
+        'abstract' => TRUE,
+        'path' => $path,
+        'file' => 'url_processor.inc',
+      ),
+    ),
     'standard' => array(
       'handler' => array(
-        'label' => t('Standard URL processors'),
+        'label' => t('Standard URL processor'),
         'class' => 'FacetapiUrlProcessorStandard',
+        'parent' => 'url_processor',
+        'path' => $path,
+        'file' => 'url_processor_standard.inc',
       ),
     ),
   );
diff --git a/facetapi.info b/facetapi.info
index 89724fa..e2b8f71 100644
--- a/facetapi.info
+++ b/facetapi.info
@@ -1,7 +1,6 @@
 name = Facet API
 description = An abstracted facet API that can be used by various search backends.
 dependencies[] = ctools
-dependencies[] = autoload
 package = Search Toolkit
 core = 6.x
 files[] = plugins/facetapi/adapter.inc
diff --git a/facetapi.module b/facetapi.module
index d9a8433..cfdc1ee 100644
--- a/facetapi.module
+++ b/facetapi.module
@@ -67,10 +67,7 @@ define('FACETAPI_REGEX_DATE_RANGE', '/^\[(' . trim(FACETAPI_REGEX_DATE, '/^$') .
 
 // Calls block specific hooks and overrides.
 require_once dirname(__FILE__) . '/facetapi.block.inc';
-
-function facetapi_init() {
-  module_load_include('inc', 'facetapi', 'facetapi.facetapi');
-}
+require_once dirname(__FILE__) . '/facetapi.facetapi.inc';
 
 /**
  * Implements hook_facetapi_hook_info().
@@ -220,29 +217,63 @@ function facetapi_menu() {
 /**
  * Implements hook_ctools_plugin_type().
  */
-function facetapi_ctools_plugin_type() {
+function facetapi_ctools_plugin_adapters() {
   return array(
-    'adapters' => array(
-      'use hooks' => TRUE,
-    ),
-    'dependencies' => array(
-      'use hooks' => TRUE,
-    ),
-    'empty_behaviors' => array(
-      'use hooks' => TRUE,
-    ),
-    'filters' => array(
-      'use hooks' => TRUE,
-    ),
-    'query_types' => array(
-      'use hooks' => TRUE,
-    ),
-    'url_processors' => array(
-      'use hooks' => TRUE,
-    ),
-    'widgets' => array(
-      'use hooks' => TRUE,
-    ),
+    'use hooks' => TRUE,
+  );
+}
+
+/**
+ * Implements hook_ctools_plugin_type().
+ */
+function facetapi_ctools_plugin_dependencies() {
+  return array(
+    'use hooks' => TRUE
+  );
+}
+
+/**
+ * Implements hook_ctools_plugin_type().
+ */
+function facetapi_ctools_plugin_empty_behaviors() {
+  return array(
+    'use hooks' => TRUE
+  );
+}
+
+/**
+ * Implements hook_ctools_plugin_type().
+ */
+function facetapi_ctools_plugin_filters() {
+  return array(
+    'use hooks' => TRUE
+  );
+}
+
+/**
+ * Implements hook_ctools_plugin_type().
+ */
+function facetapi_ctools_plugin_query_types() {
+  return array(
+    'use hooks' => TRUE
+  );
+}
+
+/**
+ * Implements hook_ctools_plugin_type().
+ */
+function facetapi_ctools_plugin_url_processors() {
+  return array(
+    'use hooks' => TRUE
+  );
+}
+
+/**
+ * Implements hook_ctools_plugin_type().
+ */
+function facetapi_ctools_plugin_widgets() {
+  return array(
+    'use hooks' => TRUE
   );
 }
 
@@ -339,10 +370,13 @@ function facetapi_adapter_load($searcher) {
   $adapters = &ctools_static(__FUNCTION__, array());
   if (!isset($adapters[$searcher])) {
     $searcher_info = facetapi_get_searcher_info();
+    dsm($searcher_info);
     if (isset($searcher_info[$searcher]['adapter'])) {
       ctools_include('plugins');
       $id = $searcher_info[$searcher]['adapter'];
+      dsm($id, 'id');
       $class = ctools_plugin_load_class('facetapi', 'adapters', $id, 'handler');
+      dsm($class, 'class');
 
       $adapters[$searcher] = ($class) ? new $class($searcher_info[$searcher]) : FALSE;
     }
@@ -1327,4 +1361,4 @@ function facetapi_parse_url($url) {
   }
 
   return $options;
-}
\ No newline at end of file
+}
diff --git a/plugins/facetapi/adapter.inc b/plugins/facetapi/adapter.inc
index 4de4934..de621f0 100644
--- a/plugins/facetapi/adapter.inc
+++ b/plugins/facetapi/adapter.inc
@@ -101,8 +101,9 @@ abstract class FacetapiAdapter {
     $registered_types = array();
     foreach (ctools_get_plugins('facetapi', 'query_types') as $plugin) {
       if ($searcher_info['adapter'] == $plugin['handler']['adapter']) {
-        $type = call_user_func(array($plugin['handler']['class'], 'getType'));
-        $registered_types[$type] = $plugin['handler']['class'];
+        $class = ctools_plugin_get_class($plugin, 'handler');
+        $type = call_user_func(array($class, 'getType'));
+        $registered_types[$type] = $class;
       }
     }
 
diff --git a/tests/facetapi.test b/tests/facetapi.test
index 284b0f9..78667b7 100644
--- a/tests/facetapi.test
+++ b/tests/facetapi.test
@@ -17,17 +17,13 @@ class FacetapiTestCase extends DrupalWebTestCase {
    * user with permissions to configure the Faceted Search interface.
    */
   public function setUp() {
-    parent::setUp('block', 'search', 'ctools', 'autoload', 'facetapi','facetapi_test');
+    parent::setUp('block', 'search', 'ctools', 'facetapi','facetapi_test');
     $this->authenticatedUser = $this->drupalCreateUser();
     $this->adminUser = $this->drupalCreateUser(array(
       'administer blocks',
       'administer search',
       'access administration pages',
     ));
-
-    // Needed for the autoload of the classes within simpletest
-    module_enable(array('autoload'));
-    autoload_registry_rebuild();
   }
 
   /**
diff --git a/tests/facetapi_test.info b/tests/facetapi_test.info
deleted file mode 100644
index eb88fcd..0000000
--- a/tests/facetapi_test.info
+++ /dev/null
@@ -1,6 +0,0 @@
-name = Facet API Test
-description = Provides a test adapter and plugins.
-dependencies[] = facetapi
-package = Testing
-core = 6.x
-hidden = TRUE
diff --git a/tests/facetapi_test.module b/tests/facetapi_test.module
deleted file mode 100644
index 6b9c28d..0000000
--- a/tests/facetapi_test.module
+++ /dev/null
@@ -1,148 +0,0 @@
-<?php
-
-/**
- * @file
- * Provides a test adapter and plugins.
- */
-
-/**
- * Placeholder text on the admin settings form.
- */
-define('FACETAPI_TEST_FORM_TEXT', t('Facet API test form'));
-
-/**
- * Implements hook_menu().
- */
-function facetapi_test_menu() {
-  $items = array();
-
-  $items['admin/settings/facetapi_test'] = array(
-    'title' => 'Facet API test',
-    'description' => 'Settings for the Facet API module.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('facetapi_test_admin_settings'),
-    'access arguments' => array('administer search'),
-  );
-
-  $items['admin/settings/facetapi_test/settings'] = array(
-    'title' => 'Settings',
-    'weight' => -10,
-    'type' => MENU_DEFAULT_LOCAL_TASK,
-  );
-
-  $items['facetapi_test/search'] = array(
-    'title' => 'Search',
-    'description' => 'Fake search page callback.',
-    'page callback' => 'facetapi_test_search_callback',
-    'access arguments' => array('access content'),
-    'type' => MENU_NORMAL_ITEM,
-  );
-
-  return $items;
-}
-
-/**
- * Implements hook_facetapi_adapters().
- */
-function facetapi_test_facetapi_adapters() {
-  return array(
-    'facetapi_test' => array(
-      'handler' => array(
-        'class' => 'FacetapiTestAdapter',
-      ),
-    ),
-  );
-}
-
-/**
- * Implements hook_facetapi_query_types().
- */
-function facetapi_test_facetapi_query_types() {
-  return array(
-    'facetapi_test_term' => array(
-      'handler' => array(
-        'class' => 'FacetapiTestTerm',
-        'adapter' => 'facetapi_test',
-      ),
-    ),
-  );
-}
-
-/**
- * Implements hook_facetapi_searcher_info().
- */
-function facetapi_test_facetapi_searcher_info() {
-  $info = array();
-
-  $info['facetapi_test'] = array(
-    'label' => t('Facet API Test'),
-    'adapter' => 'facetapi_test',
-    'type' => 'test',
-    'path' => 'admin/settings/facetapi_test',
-    'supports facet missing' => FALSE,
-  );
-
-  return $info;
-}
-
-/**
- * Placeholder for the admin settings form.
- */
-function facetapi_test_admin_settings(&$form_state) {
-  $form = array();
-  $form['text'] = array(
-    '#value' => FACETAPI_TEST_FORM_TEXT,
-  );
-  return $form;
-}
-
-/**
- * Implements hook_facetapi_facet_info().
- */
-function facetapi_test_facetapi_facet_info($searcher_info) {
-  $facets = array();
-  if ('test' == $searcher_info['type']) {
-
-    $facets['enabled'] = array(
-      'label' => t('Enabled facet'),
-      'description' => t('Facet that tests enabling.'),
-      'dependency plugins' => array('role'),
-    );
-
-    $facets['disabled'] = array(
-      'label' => t('Disabled facet'),
-      'description' => t('Facet that tests disabling.'),
-      'dependency plugins' => array('role'),
-    );
-
-    $facets['colon:test'] = array(
-      'label' => t('Colon test'),
-      'description' => t('Test facets names with colonss.'),
-      'dependency plugins' => array('role'),
-    );
-  }
-  return $facets;
-}
-
-/**
- * Fake search page callback.
- */
-function facetapi_test_search_callback() {
-  $build = array();
-
-  if (!$adapter = facetapi_adapter_load('facetapi_test')) {
-    throw new Exception(t('Error loading adapter.'));
-  }
-
-  $query = new stdClass();
-  $adapter->addActiveFilters($query);
-
-  $keys = isset($_GET['keys']) ? $_GET['keys'] : arg(2);
-  $adapter->setSearchKeys($keys);
-
-  $build['placeholder'] = array(
-    '#value' => t('Placeholder'),
-  );
-
-  return $build;
-}
diff --git a/tests/facetapi_test.plugins.inc b/tests/facetapi_test.plugins.inc
deleted file mode 100644
index ea8b90d..0000000
--- a/tests/facetapi_test.plugins.inc
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/**
- * Test plugins for Facet API.
- */
-
-/**
- * Facet API adapter for the Apache Solr Search Integration module.
- */
-class FacetapiTestAdapter extends FacetapiAdapter {
-
-  /**
-   * The total number of results in the query.
-   */
-  protected $resultCount;
-
-  /**
-   * Returns a boolean flagging whether $this->searcher executed a search.
-   */
-  public function searchExecuted() {
-    return !empty($this->keys);
-  }
-
-  /**
-   * Returns a boolean flagging whether facets in a realm shoud be displayed.
-   */
-  public function suppressOutput($realm_name) {
-
-  }
-
-  /**
-   * Sets the result count.
-   */
-  public function setResultCount($count) {
-    $this->resultCount = $count;
-    return $this;
-  }
-
-  /**
-   * Returns the nmber of total results found for the current search.
-   */
-  public function getResultCount() {
-    return $this->resultCount;
-  }
-}
-
-/**
- * Plugin for "term" query types.
- */
-class FacetapiTestTerm extends FacetapiQueryType implements FacetapiQueryTypeInterface {
-
-  static public function getType() {
-    return 'term';
-  }
-
-  public function execute($query) {
-    // Nothing to do...
-  }
-
-  public function build() {
-    $build = array();
-
-    $build['testone'] = array('#count' => 1);
-    $build['testtwo'] = array('#count' => 2);
-    $build['testthree'] = array('#count' => 3);
-
-    // Returns initialized build.
-    return $build;
-  }
-}
diff --git a/tests/facetapi_test/facetapi_test.info b/tests/facetapi_test/facetapi_test.info
new file mode 100644
index 0000000..eb88fcd
--- /dev/null
+++ b/tests/facetapi_test/facetapi_test.info
@@ -0,0 +1,6 @@
+name = Facet API Test
+description = Provides a test adapter and plugins.
+dependencies[] = facetapi
+package = Testing
+core = 6.x
+hidden = TRUE
diff --git a/tests/facetapi_test/facetapi_test.module b/tests/facetapi_test/facetapi_test.module
new file mode 100644
index 0000000..1d22910
--- /dev/null
+++ b/tests/facetapi_test/facetapi_test.module
@@ -0,0 +1,153 @@
+<?php
+
+/**
+ * @file
+ * Provides a test adapter and plugins.
+ */
+
+/**
+ * Placeholder text on the admin settings form.
+ */
+define('FACETAPI_TEST_FORM_TEXT', t('Facet API test form'));
+
+/**
+ * Implements hook_menu().
+ */
+function facetapi_test_menu() {
+  $items = array();
+
+  $items['admin/settings/facetapi_test'] = array(
+    'title' => 'Facet API test',
+    'description' => 'Settings for the Facet API module.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('facetapi_test_admin_settings'),
+    'access arguments' => array('administer search'),
+  );
+
+  $items['admin/settings/facetapi_test/settings'] = array(
+    'title' => 'Settings',
+    'weight' => -10,
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+  );
+
+  $items['facetapi_test/search'] = array(
+    'title' => 'Search',
+    'description' => 'Fake search page callback.',
+    'page callback' => 'facetapi_test_search_callback',
+    'access arguments' => array('access content'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  return $items;
+}
+
+/**
+ * Implements hook_facetapi_widgets().
+ */
+function facetapi_test_facetapi_adapters() {
+  $adapters = array();
+  $adapters['facetapi_test'] = array(
+    'handler' => array(
+      'label' => t('class for Test Adapter'),
+      'class' => 'FacetapiTestAdapter',
+      'path' => drupal_get_path('module', 'facetapi_test') . '/plugins/facetapi',
+      'file' => 'test_adapter.inc',
+      'parent' => 'adapter',
+    ),
+  );
+  return $adapters;
+}
+
+/**
+ * Implements hook_facetapi_query_types().
+ */
+function facetapi_test_facetapi_query_types() {
+  $query_types['facetapi_test_term'] = array(
+    'handler' => array(
+      'class' => 'FacetapiTestTerm',
+      'parent' => 'query_type',
+      'adapter' => 'facetapi_test',
+      'path' => drupal_get_path('module', 'facetapi_test') . '/plugins/facetapi',
+      'file' => 'test_query_type.inc',
+    ),
+  );
+  return $query_types;
+}
+
+/**
+ * Implements hook_facetapi_searcher_info().
+ */
+function facetapi_test_facetapi_searcher_info() {
+  $info = array();
+  $info['facetapi_test'] = array(
+    'label' => t('Facet API Test'),
+    'adapter' => 'facetapi_test',
+    'type' => 'test',
+    'path' => 'admin/settings/facetapi_test',
+    'supports facet missing' => FALSE,
+  );
+
+  return $info;
+}
+
+/**
+ * Placeholder for the admin settings form.
+ */
+function facetapi_test_admin_settings(&$form_state) {
+  $form = array();
+  $form['text'] = array(
+    '#value' => FACETAPI_TEST_FORM_TEXT,
+  );
+  return $form;
+}
+
+/**
+ * Implements hook_facetapi_facet_info().
+ */
+function facetapi_test_facetapi_facet_info($searcher_info) {
+  $facets = array();
+  if ('test' == $searcher_info['type']) {
+
+    $facets['enabled'] = array(
+      'label' => t('Enabled facet'),
+      'description' => t('Facet that tests enabling.'),
+      'dependency plugins' => array('role'),
+    );
+
+    $facets['disabled'] = array(
+      'label' => t('Disabled facet'),
+      'description' => t('Facet that tests disabling.'),
+      'dependency plugins' => array('role'),
+    );
+
+    $facets['colon:test'] = array(
+      'label' => t('Colon test'),
+      'description' => t('Test facets names with colonss.'),
+      'dependency plugins' => array('role'),
+    );
+  }
+  return $facets;
+}
+
+/**
+ * Fake search page callback.
+ */
+function facetapi_test_search_callback() {
+  $build = array();
+
+  if (!$adapter = facetapi_adapter_load('facetapi_test')) {
+    throw new Exception(t('Error loading adapter.'));
+  }
+
+  $query = new stdClass();
+  $adapter->addActiveFilters($query);
+
+  $keys = isset($_GET['keys']) ? $_GET['keys'] : arg(2);
+  $adapter->setSearchKeys($keys);
+
+  $build['placeholder'] = array(
+    '#value' => t('Placeholder'),
+  );
+
+  return $build;
+}
