private IndexSegment generateIndexSegment(Offset startOffset, int entrySize, int valueSize,
      short persistentIndexVersion) {
    MetricRegistry metricRegistry = new MetricRegistry();
    StoreMetrics metrics = new StoreMetrics(metricRegistry);
    StoreConfig config = new StoreConfig(new VerifiableProperties(state.properties));
    return new MockIndexSegment(tempDir.getAbsolutePath(), startOffset, CuratedLogIndexState.STORE_KEY_FACTORY,
        entrySize, valueSize, config, metrics, state.time, persistentIndexVersion);
  }
Generate {@link IndexSegment} of version {@link PersistentIndex#VERSION_0}
@param startOffset the start offset of the {@link IndexSegment}
@param entrySize The entry size that this segment supports
@param valueSize The value size that this segment supports
@param persistentIndexVersion
@return the {@link IndexSegment} created of version {@link PersistentIndex#VERSION_0}
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java