@Test
    public void testGetObjectsWithFirstStreamSetObject() throws ExecutionException, InterruptedException {
        S3StreamsMetadataImage streamsImage = createStreamImage();

        InRangeObjects objects = streamsImage.getObjects(STREAM0, 12L, 30, 4, defaultRangeGetter).get();
        assertEquals(2, objects.objects().size());
        assertEquals(10L, objects.startOffset());
        assertEquals(40L, objects.endOffset());

        objects = streamsImage.getObjects(STREAM0, 12L, 30, 1, defaultRangeGetter).get();
        assertEquals(1, objects.objects().size());
        assertEquals(10L, objects.startOffset());
        assertEquals(20L, objects.endOffset());
    }
Test get objects with the first hit object is a stream set object.
metadata/src/test/java/org/apache/kafka/image/S3StreamsMetadataImageTest.java