Freeze time to avoid a race condition
where a second is ticking in the middle
of a unit test.
Bug: T154188
Change-Id: I6b0c8ae06360e6da016d97361cc2ccdeaf2e4343
Whether we estimate or not, the actual stored count should always be
normalized within the range of 0-cap. Estimation should always skip if
the current count is at the cap; in that case, the count can only be
changed when we get the value from the API through setCount() (used
when the value is known, rather than estimated.)
Change-Id: Ie8b81a4433e8254ee0e90f59e5b25d727158eecf