diff --git a/config/optional/rest.resource.monitoring_sensor.yml b/config/optional/rest.resource.monitoring_sensor.yml
new file mode 100644
index 0000000..7424a24
--- /dev/null
+++ b/config/optional/rest.resource.monitoring_sensor.yml
@@ -0,0 +1,17 @@
+langcode: en
+status: TRUE
+dependencies:
+  module:
+    - basic_auth
+    - monitoring
+    - user
+id: monitoring_sensor
+plugin_id: 'monitoring-sensor'
+granularity: method
+configuration:
+  GET:
+    supported_formats:
+      - json
+    supported_auth:
+      - basic_auth
+      - cookie
diff --git a/config/optional/rest.resource.monitoring_sensor_result.yml b/config/optional/rest.resource.monitoring_sensor_result.yml
new file mode 100644
index 0000000..9e88949
--- /dev/null
+++ b/config/optional/rest.resource.monitoring_sensor_result.yml
@@ -0,0 +1,17 @@
+langcode: en
+status: TRUE
+dependencies:
+  module:
+    - basic_auth
+    - monitoring
+    - user
+id: monitoring_sensor_result
+plugin_id: 'monitoring-sensor-result'
+granularity: method
+configuration:
+  GET:
+    supported_formats:
+      - json
+    supported_auth:
+      - basic_auth
+      - cookie
diff --git a/modules/demo/monitoring_demo.info.yml b/modules/demo/monitoring_demo.info.yml
index 67fc3f8..940c070 100644
--- a/modules/demo/monitoring_demo.info.yml
+++ b/modules/demo/monitoring_demo.info.yml
@@ -11,6 +11,6 @@ dependencies:
  - search_api_db
  - monitoring
  - rest
- - hal
+ - basic_auth
  - dblog
  - file
diff --git a/modules/demo/monitoring_demo.install b/modules/demo/monitoring_demo.install
index ed797ef..01a0d63 100644
--- a/modules/demo/monitoring_demo.install
+++ b/modules/demo/monitoring_demo.install
@@ -21,26 +21,6 @@ function monitoring_demo_install() {
     ->set('page.front', '/monitoring-demo')
     ->save();
 
-  // Enable REST API for monitoring resources.
-  $settings = array(
-    'monitoring-sensor' => array(
-      'GET' => array(
-        'supported_formats' => array('hal_json'),
-        'supported_auth' => array('cookie'),
-      ),
-    ),
-    'monitoring-sensor-result' => array(
-      'GET' => array(
-        'supported_formats' => array('hal_json'),
-        'supported_auth' => array('cookie'),
-      ),
-    ),
-  );
-  \Drupal::configFactory()
-    ->getEditable('rest.settings')
-    ->set('resources', $settings)
-    ->save();
-
   // Create a few nodes and comments as sample data for some sensors.
   $nodes = [];
   $nodes[] = _monitoring_setup_create_node(array('type' => 'article'));
diff --git a/modules/multigraph/config/optional/rest.resource.monitoring_multigraph.yml b/modules/multigraph/config/optional/rest.resource.monitoring_multigraph.yml
new file mode 100644
index 0000000..36a6e2a
--- /dev/null
+++ b/modules/multigraph/config/optional/rest.resource.monitoring_multigraph.yml
@@ -0,0 +1,17 @@
+langcode: en
+status: TRUE
+dependencies:
+  module:
+    - basic_auth
+    - monitoring_multigraph
+    - user
+id: monitoring_multigraph
+plugin_id: 'monitoring-multigraph'
+granularity: method
+configuration:
+  GET:
+    supported_formats:
+      - json
+    supported_auth:
+      - basic_auth
+      - cookie
diff --git a/modules/multigraph/src/Tests/MultigraphServicesTest.php b/modules/multigraph/src/Tests/MultigraphServicesTest.php
index 0b735b5..1b0cfbd 100644
--- a/modules/multigraph/src/Tests/MultigraphServicesTest.php
+++ b/modules/multigraph/src/Tests/MultigraphServicesTest.php
@@ -26,7 +26,8 @@ class MultigraphServicesTest extends RESTTestBase {
     'dblog',
     'hal',
     'rest',
-    'monitoring',
+    'node',
+    'basic_auth',
     'monitoring_multigraph',
   );
 
@@ -46,20 +47,6 @@ class MultigraphServicesTest extends RESTTestBase {
     $this->defaultMimeType = 'application/json';
     $this->defaultFormat = 'json';
 
-    // Enable REST API for monitoring resources.
-    $config = $this->config('rest.settings');
-    $settings = array(
-      'monitoring-multigraph' => array(
-        'GET' => array(
-          'supported_formats' => array($this->defaultFormat),
-          'supported_auth' => $this->defaultAuth,
-        ),
-      ),
-    );
-    $config->set('resources', $settings);
-    $config->save();
-    $this->rebuildCache();
-
     $this->servicesAccount = $this->drupalCreateUser(array(
       'restful get monitoring-multigraph',
     ));
diff --git a/src/Plugin/monitoring/SensorPlugin/CommerceTurnoverSensorPlugin.php b/src/Plugin/monitoring/SensorPlugin/CommerceTurnoverSensorPlugin.php
index 6648a3d..6d3c1d3 100644
--- a/src/Plugin/monitoring/SensorPlugin/CommerceTurnoverSensorPlugin.php
+++ b/src/Plugin/monitoring/SensorPlugin/CommerceTurnoverSensorPlugin.php
@@ -29,8 +29,8 @@ class CommerceTurnoverSensorPlugin extends ContentEntityAggregatorSensorPlugin {
   /**
    * {@inheritdoc}
    */
-  protected function getEntityQueryAggregate($table, array $conditions, array $time_interval = array()) {
-    $query = parent::getEntityQueryAggregate($table, $conditions, $time_interval);
+  protected function getEntityQueryAggregate() {
+    $query = parent::getEntityQueryAggregate();
 
     // Get the field name for the amount field.
     $field_amount = $this->getFieldName($query, array('field' => 'commerce_order_total.amount'));
diff --git a/src/Tests/MonitoringServicesTest.php b/src/Tests/MonitoringServicesTest.php
index 72e1a6a..8a59c79 100644
--- a/src/Tests/MonitoringServicesTest.php
+++ b/src/Tests/MonitoringServicesTest.php
@@ -18,7 +18,7 @@ use Drupal\rest\Tests\RESTTestBase;
  */
 class MonitoringServicesTest extends RESTTestBase {
 
-  public static $modules = array('dblog', 'hal', 'rest', 'monitoring', 'views');
+  public static $modules = array('dblog', 'basic_auth', 'monitoring', 'views', 'node');
 
   /**
    * User account created.
@@ -36,26 +36,6 @@ class MonitoringServicesTest extends RESTTestBase {
     $this->defaultMimeType = 'application/json';
     $this->defaultFormat = 'json';
 
-    // Enable REST API for monitoring resources.
-    $config = $this->config('rest.settings');
-    $settings = array(
-      'monitoring-sensor' => array(
-        'GET' => array(
-          'supported_formats' => array($this->defaultFormat),
-          'supported_auth' => $this->defaultAuth,
-        ),
-      ),
-      'monitoring-sensor-result' => array(
-        'GET' => array(
-          'supported_formats' => array($this->defaultFormat),
-          'supported_auth' => $this->defaultAuth,
-        ),
-      ),
-    );
-    $config->set('resources', $settings);
-    $config->save();
-    $this->rebuildCache();
-
     $this->servicesAccount = $this->drupalCreateUser(array('restful get monitoring-sensor', 'restful get monitoring-sensor-result'));
   }
 
diff --git a/tests/src/Kernel/MonitoringSearchAPITest.php b/tests/src/Kernel/MonitoringSearchAPITest.php
index 9ed283f..ad2a578 100644
--- a/tests/src/Kernel/MonitoringSearchAPITest.php
+++ b/tests/src/Kernel/MonitoringSearchAPITest.php
@@ -6,10 +6,9 @@
 
 namespace Drupal\Tests\monitoring\Kernel;
 
-use Drupal\entity_test\Entity\EntityTest;
+use Drupal\entity_test\Entity\EntityTestMulRevChanged;
 use Drupal\monitoring\Entity\SensorConfig;
 use Drupal\search_api\Entity\Index;
-use Drupal\search_api_db\Tests;
 
 /**
  * Tests for search API sensor.
@@ -40,12 +39,13 @@ class MonitoringSearchAPITest extends MonitoringUnitTestBase {
   public function setUp() {
     parent::setUp();
     // Install required database tables for each module.
-    $this->installSchema('search_api', ['search_api_item', 'search_api_task']);
+    $this->installSchema('search_api', ['search_api_item']);
+    $this->installEntitySchema('search_api_task');
     $this->installSchema('system', ['router', 'queue', 'key_value_expire']);
     $this->installSchema('user', ['users_data']);
 
-    // Install the schema for entity entity_test.
-    $this->installEntitySchema('entity_test');
+    // Install the schema for entity entity_test_mulrev_changed.
+    $this->installEntitySchema('entity_test_mulrev_changed');
 
     // Set up the required bundles.
     $this->createEntityTestBundles();
@@ -63,9 +63,9 @@ class MonitoringSearchAPITest extends MonitoringUnitTestBase {
 
     // Create content first to avoid a Division by zero error.
     // Two new articles, none indexed.
-    $entity = EntityTest::create(array('type' => 'article'));
+    $entity = EntityTestMulRevChanged::create(array('type' => 'article'));
     $entity->save();
-    $entity = EntityTest::create(array('type' => 'article'));
+    $entity = EntityTestMulRevChanged::create(array('type' => 'article'));
     $entity->save();
 
     $result = $this->runSensor('search_api_database_search_index');
@@ -75,11 +75,11 @@ class MonitoringSearchAPITest extends MonitoringUnitTestBase {
     $index = Index::load('database_search_index');
     $index->indexItems();
 
-    $entity = EntityTest::create(array('type' => 'article'));
+    $entity = EntityTestMulRevChanged::create(array('type' => 'article'));
     $entity->save();
-    $entity = EntityTest::create(array('type' => 'article'));
+    $entity = EntityTestMulRevChanged::create(array('type' => 'article'));
     $entity->save();
-    $entity = EntityTest::create(array('type' => 'article'));
+    $entity = EntityTestMulRevChanged::create(array('type' => 'article'));
     $entity->save();
 
     // New articles are not yet indexed.
@@ -122,8 +122,8 @@ class MonitoringSearchAPITest extends MonitoringUnitTestBase {
    * Sets up the necessary bundles on the test entity type.
    */
   protected function createEntityTestBundles() {
-    entity_test_create_bundle('item');
-    entity_test_create_bundle('article');
+    entity_test_create_bundle('item', NULL, 'entity_test_mulrev_changed');
+    entity_test_create_bundle('article', NULL, 'entity_test_mulrev_changed');
   }
 
 }
