private boolean isTtlUpdateEntryValidWhenFinalStateIsDeleteAndRetention(MockId key, IndexValue ttlUpdateValue,
      FileSpan fileSpanUnderCompaction) {
    // valid if the original put is valid
    IndexValue putValue = getExpectedValue(key, EnumSet.of(PersistentIndex.IndexEntryType.PUT), null);
    if (putValue != null) {
      if (fileSpanUnderCompaction != null) {
        return !fileSpanUnderCompaction.inSpan(putValue.getOffset());
      } else {
        return !putValue.getOffset().getName().equals(ttlUpdateValue.getOffset().getName());
      }
    }
    return false;
  }
Determines whether a TTL update entry is valid
@param key the {@link MockId} being examined
@param ttlUpdateValue the {@link IndexValue} associated with the TTL update entry of {@code key}.
@param fileSpanUnderCompaction only useful for compaction tests to help determine whether update records will be
                               cleaned up. All other use cases should use {@code null}.
@return {@code true} if the TTL update entry is valid
ambry-store/src/test/java/com/github/ambry/store/CuratedLogIndexState.java