testUndoRestartsChangeEvents() {
    undoPlugin.registerFieldObject(editableField);
    editableField.makeEditable();
    editableField.setSafeHtml(false, SafeHtml.create('div', {}, 'a'));
    clock.tick(1000);
    undoPlugin.enable(editableField);

    // Change content so we can undo it.
    editableField.setSafeHtml(false, SafeHtml.create('div', {}, 'b'));
    clock.tick(1000);

    const currentState = undoPlugin.currentStates_[fieldHashCode];
    stubs.set(
        editableField, 'setCursorPosition',
        functions.error('Faking exception during setCursorPosition()'));
    try {
      currentState.undo();
    } catch (e) {
      fail('Exception should not have been thrown during undo()');
    }
    assertEquals(
        'Change events should be on', 0,
        editableField.stoppedEvents_[Field.EventType.CHANGE]);
    assertEquals(
        'Delayed change events should be on', 0,
        editableField.stoppedEvents_[Field.EventType.DELAYEDCHANGE]);
  }
Tests that change events get restarted properly after an undo call despite
an exception being thrown in the process (see bug/1991234).
@suppress {visibility} suppression added to enable type checking