void advanceTime(long ms) {
    time.sleep(ms);
    Iterator<MockId> liveKeysIterator = liveKeys.iterator();
    while (liveKeysIterator.hasNext()) {
      MockId id = liveKeysIterator.next();
      IndexValue value = getExpectedValue(id, false);
      if (value.getExpiresAtMs() != Utils.Infinite_Time && value.getExpiresAtMs() < time.milliseconds()) {
        expiredKeys.add(id);
        liveKeysIterator.remove();
      }
    }
  }
Advances time by {@code ms} and adjusts {@link #liveKeys} if any of the keys in it expire.
@param ms the amount in ms to advance.
ambry-store/src/test/java/com/github/ambry/store/CuratedLogIndexState.java