private void advanceTimeToNextSecond() {
    long currentTimeInMs = state.time.milliseconds();
    state.advanceTime(Time.MsPerSec - currentTimeInMs % Time.MsPerSec);
  }
Advance the time to the next nearest second. That is, 1 sec to 2 sec or 1001 ms to 2000ms.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreStatsTest.java