tearDown() {
    // Make sure promises and other stuff that may still be scheduled,
    // get a
    // chance to run (and throw errors).
    if (this.hasMockClock()) {
      if (this.mockClock.isSynchronous()) {
        for (let i = 0; i < 100; i++) {
          this.mockClock.tick(1000);
        }
      }
      this.mockClock.reset();
    }
    // Reset all changes made by the PropertyReplacer.
    this.replacer.reset();
    // Make sure the user did not forget to call $replayAll & $verifyAll
    // in their test. This is a noop if they did. This is important
    // because:
    // - Engineers thinks that not all their tests need to replay and
    // verify.
    //   That lets tests sneak in that call mocks but never replay those
    //   calls.
    // - Then some well meaning maintenance engineer wants to update the
    // test
    //   with some new mock, adds a replayAll and BOOM the test fails
    //   because completely unrelated mocks now get replayed.
    if (this.mockControl) {
      try {
        this.mockControl.$verifyAll();
        this.mockControl.$replayAll();
        this.mockControl.$verifyAll();
      } finally {
        this.mockControl.$resetAll();
        if (this.shouldMakeMockControl_) {
          // If we created the mockControl, we'll also tear it down.
          this.mockControl.$tearDown();
        }
      }
    }
    // Verifying the mockControl may throw, so if cleanup needs to
    // happen, add it further up in the function.
  }
Runs immediately after the tearDown phase of JsUnit tests.
@return {!IThenable<*>|undefined} An optional Promise which must be
    resolved before the next test case is executed.
@override