private void verifyIndexValue(IndexValue value, LogSegmentName logSegmentName, long size, long offset,
      EnumSet<IndexValue.Flags> flags, long expiresAtMs, long originalMessageOffset, long operationTimeInMs,
      short accountId, short containerId, short lifeVersion) {
    switch (version) {
      case PersistentIndex.VERSION_0:
        operationTimeInMs = Utils.Infinite_Time;
        accountId = UNKNOWN_ACCOUNT_ID;
        containerId = UNKNOWN_CONTAINER_ID;
        break;
      case PersistentIndex.VERSION_1:
      case PersistentIndex.VERSION_2:
      case PersistentIndex.VERSION_3:
      case PersistentIndex.VERSION_4:
        expiresAtMs = expiresAtMs >= 0 ? Utils.getTimeInMsToTheNearestSec(expiresAtMs) : Utils.Infinite_Time;
        expiresAtMs =
            TimeUnit.MILLISECONDS.toSeconds(expiresAtMs) > Integer.MAX_VALUE ? Utils.Infinite_Time : expiresAtMs;
        break;
    }
    verifyGetters(value, logSegmentName, size, offset, flags, expiresAtMs, originalMessageOffset, operationTimeInMs,
        accountId, containerId, lifeVersion);
    // check value after ser-deser
    verifyGetters(new IndexValue(logSegmentName, value.getBytes(), version), logSegmentName, size, offset, flags,
        expiresAtMs, originalMessageOffset, operationTimeInMs, accountId, containerId, lifeVersion);
    verifyInvalidValueSize(value, logSegmentName);
  }
Verifies the given {@code value} for the returns of the getters. Also verifies that an {@link IndexValue} created
with {@link IndexValue#getBytes()} from {@code value} exports the same data.
@param value the {@link IndexValue} that needs to be checked.
@param logSegmentName the name of the log segment containing the record for which {@code value} is the
{@link IndexValue}.
@param size the size expected in {@code value}.
@param offset the offset expected in {@code value}.
@param flags the expected flags in {@code value}.
@param expiresAtMs the expected expiration time in {@code value}.
@param originalMessageOffset the original message offset expected in {@code value}.
@param operationTimeInMs the operation time in ms
@param accountId the accountId of the Index value
@param containerId the containerId of the Index value
@param lifeVersion the update version of the Index value
ambry-store/src/test/java/com/github/ambry/store/IndexValueTest.java