testBecomeActive() {
    const idleThreshold = 1000;
    const mockActivityMonitor = new MockActivityMonitor();
    const idleTimer = new IdleTimer(idleThreshold, mockActivityMonitor);

    clock.tick(idleThreshold + 1);
    assert('Precondition: user should be idle', idleTimer.isIdle());

    let onBecomeActiveCount = 0;
    const onBecomeActive = () => {
      onBecomeActiveCount += 1;
    };
    events.listen(idleTimer, IdleTimer.Event.BECOME_ACTIVE, onBecomeActive);

    clock.tick(idleThreshold);
    assert('The BECOME_ACTIVE event fired too early', onBecomeActiveCount == 0);
    assert('The user should still be idle', idleTimer.isIdle());

    mockActivityMonitor.simulateEvent();
    assert('The BECOME_ACTIVE event fired too late', onBecomeActiveCount == 1);
    assertFalse('The user should be active', idleTimer.isIdle());

    idleTimer.dispose();
  }
Tests whether an event is fired when the user becomes active