testPlainTextSpellCheckerWordReplacement() {
    const handler = new SpellCheck(localSpellCheckingFunction);
    const s = new PlainTextSpellChecker(handler);
    /** @suppress {visibility} suppression added to enable type checking */
    s.asyncWordsPerBatch_ = 100;
    const el = document.getElementById('test3');
    s.decorate(el);
    let text = '';
    for (let i = 0; i < 10; ++i) {
      text += generateRandomString(10, false) + '\n';
    }
    /**
     * @suppress {strictMissingProperties} suppression added to enable type
     * checking
     */
    el.value = text;

    const timerSav = Timer.callOnce;
    /** @suppress {checkTypes} suppression added to enable type checking */
    Timer.callOnce = localTimer;

    s.check();
    processTimerQueue();

    /** @suppress {visibility} suppression added to enable type checking */
    const container = s.overlay_;
    let wordEl = container.firstChild;
    while (wordEl) {
      if (dom.getTextContent(wordEl) == missspelling) {
        break;
      }
      wordEl = wordEl.nextSibling;
    }

    if (!wordEl) {
      assertTrue(
          'Cannot find the world that should have been here.' +
              'Please revise the test',
          false);
      return;
    }

    /** @suppress {visibility} suppression added to enable type checking */
    s.activeWord_ = missspelling;
    /**
     * @suppress {visibility,checkTypes} suppression added to enable type
     * checking
     */
    s.activeElement_ = wordEl;
    /** @suppress {visibility} suppression added to enable type checking */
    const suggestions = s.getSuggestions_();
    s.replaceWord(wordEl, missspelling, 'foo');
    assertEquals(
        'Should have set the original word attribute!',
        wordEl.getAttribute(AbstractSpellChecker.ORIGINAL_), missspelling);

    /** @suppress {visibility} suppression added to enable type checking */
    s.activeWord_ = dom.getTextContent(wordEl);
    /**
     * @suppress {visibility,checkTypes} suppression added to enable type
     * checking
     */
    s.activeElement_ = wordEl;
    /** @suppress {visibility} suppression added to enable type checking */
    const newSuggestions = s.getSuggestions_();
    assertEquals(
        'Suggestion list should still be present even if the word ' +
            'is now correct!',
        suggestions, newSuggestions);

    s.resume();
    processTimerQueue();

    Timer.callOnce = timerSav;
    s.dispose();
  }
@suppress {checkTypes,strictMissingProperties,visibility} suppression
     added to enable type checking