private boolean isWithinFileSpan(Offset offset, FileSpan fileSpan) {
    return fileSpan == null
        || offset.compareTo(fileSpan.getStartOffset()) >= 0 && offset.compareTo(fileSpan.getEndOffset()) < 0;
  }
@param offset the {@link Offset} to check
@param fileSpan the {@link FileSpan} to use for checking
@return {@code true} if {@code offset} is within the {@code fileSpan}.
ambry-store/src/test/java/com/github/ambry/store/CuratedLogIndexState.java