Set<MockId> getIdsWithPutsInLogSegment(LogSegment segment) {
    Set<MockId> idsInSegment = new HashSet<>();
    Offset indexSegmentStartOffset = new Offset(segment.getName(), segment.getStartOffset());
    while (indexSegmentStartOffset != null && indexSegmentStartOffset.getName().equals(segment.getName())) {
      referenceIndex.get(indexSegmentStartOffset).forEach((key, values) -> values.forEach(value -> {
        if (value.getFlags() == IndexValue.FLAGS_DEFAULT_VALUE) {
          idsInSegment.add(key);
        }
      }));
      indexSegmentStartOffset = referenceIndex.higherKey(indexSegmentStartOffset);
    }
    return idsInSegment;
  }
Returns all ids that have PUT records in the provided {@code segment}.
@param segment the {@link LogSegment} to get the ids of all records for.
@return all ids that have PUT records in the provided {@code segment}.
ambry-store/src/test/java/com/github/ambry/store/CuratedLogIndexState.java