@Override
    public Reader createReader(ResultSubpartitionView subpartitionView) throws IOException {
        checkState(!fileChannel.isOpen());

        final FileChannel fc = FileChannel.open(filePath, StandardOpenOption.READ);
        return new FileBufferReader(fc, memorySegmentSize, subpartitionView);
    }
@TestTemplate
    void testReadNextBuffer() throws Exception {
        final int numberOfBuffers = 3;
        try (final BoundedData data = createBoundedData()) {
            writeBuffers(data, numberOfBuffers);

            final BoundedData.Reader reader = data.createReader();
            final Buffer buffer1 = reader.nextBuffer();
            final Buffer buffer2 = reader.nextBuffer();

            assertThat(buffer1).isNotNull();
            assertThat(buffer2).isNotNull();
            // there are only two available memory segments for reading data
            assertThat(reader.nextBuffer()).isNull();

            // cleanup
            buffer1.recycleBuffer();
            buffer2.recycleBuffer();
        }
    }