ElasticLogSegment createOrLoadSegment(long offset, int indexIntervalBytes, Time time) throws IOException {
        Properties props = new Properties();
        props.put(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG, indexIntervalBytes);

        ElasticStreamSegmentMeta meta = segmentMetas.computeIfAbsent(offset, k -> {
            ElasticStreamSegmentMeta m = new ElasticStreamSegmentMeta();
            m.baseOffset(offset);
            return m;
        });
        ElasticStreamSliceManager manager = segmentStreams.computeIfAbsent(offset, k -> {
            try {
                return new ElasticStreamSliceManager(new ElasticLogStreamManager(new HashMap<>(), new MemoryClient.StreamClientImpl(), 1, 0, new HashMap<>(), false));
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        });

        return new ElasticLogSegment(logDir, meta, manager, new LogConfig(props), time, (a, b) -> {
        }, "");
    }
This test was intended to check file size and positions after closing and reopening a segment.
Since there is no log file in ElasticLogSegment, we only test the segment size when reopening.
The method name is kept the same for compatibility.
core/src/test/java/kafka/log/streamaspect/ElasticLogSegmentTest.java