/**
 * Extend a given state class for testing and return its subclass.
 * @param {StateClass} StateClass - The state class to be extended.
 * @param {Object} initialState - The initial state of the instance.
 * @return {StateClass} The subclass of the given class.
 */
export function createTestState(StateClass, initialState) {
  class TestState extends StateClass {
    constructor() {
      super();
      this.state = initialState;
    }

    getState() {
      return this.state;
    }

    setState(nextState) {
      this.state = nextState;
    }
  }

  return TestState;
}

@@ -308,22 +308,8 @@
 lass
-, initialState
 ) %7B%0A
@@ -363,16 +363,28 @@
 tructor(
+initialState
 ) %7B%0A    

Fix helper method