diff --git a/tests/hooks_test_hooks/src/TestEventSubscriber.php b/tests/hooks_test_hooks/src/TestEventSubscriber.php
index 8cf7970..644c500 100644
--- a/tests/hooks_test_hooks/src/TestEventSubscriber.php
+++ b/tests/hooks_test_hooks/src/TestEventSubscriber.php
@@ -34,11 +34,19 @@ class TestEventSubscriber implements EventSubscriberInterface {
   }
 
   /**
+   * When we make no changes the values should not change.
+   */
+  public function onTestNoChange(HookEvent $event, $event_name, $dispatcher) {
+
+  }
+
+  /**
    * {@inheritdoc}
    */
   public static function getSubscribedEvents() {
     $events['hooks.test_hook'][] = ['onTestHook'];
     $events['hooks.test_hook_multiple'][] = ['onTestHookMultiple'];
+    $events['hooks.test_hook_no_changes'][] = ['onTestNoChange'];
     return $events;
   }
 
diff --git a/tests/src/Kernel/HooksModuleHandlerTest.php b/tests/src/Kernel/HooksModuleHandlerTest.php
index 8bf6ff3..a278385 100644
--- a/tests/src/Kernel/HooksModuleHandlerTest.php
+++ b/tests/src/Kernel/HooksModuleHandlerTest.php
@@ -33,13 +33,21 @@ class HooksModuleHandlerTest extends KernelTestBase {
     $this->moduleHandler()
       ->alter('test_hook', $test_data, $context1, $context2);
     $this->assertSame('test data Manipulated by onTestHook', $test_data);
-    $this->assertSame('ontesthook_context1', $context1);
-    $this->assertSame('ontesthook_context2', $context2);
+
+    // Test the contexts are preserved when no changes are made.
+    $context1 = 'context1';
+    $context2 = 'context2';
+    $this->moduleHandler()
+      ->alter('test_hook_no_changes', $test_data, $context1, $context2);
+    $this->assertSame('context1', $context1, 'Context 1 value was preserved');
+    $this->assertSame('context2', $context2, 'Context 2 value was preserved');
 
     // Test with an array of types.
     $test_data = 'test data';
     $this->moduleHandler()
-      ->alter(['test_hook', 'test_hook_multiple'], $test_data);
+      ->alter(['test_hook', 'test_hook_multiple'], $test_data, $context1, $context2);
+    $this->assertSame('ontesthook_context1', $context1, 'Context 1 new value was passed back');
+    $this->assertSame('ontesthook_context2', $context2, 'Context 2 new value was passed back');
 
     $this->assertSame('test data Manipulated by onTestHook Manipulated by onTestHookMultiple', $test_data);
   }
