private CompletedFetch completedFetch(TopicPartition tp) {
        FetchResponseData.PartitionData partitionData = new FetchResponseData.PartitionData();
        FetchMetricsAggregator metricsAggregator = new FetchMetricsAggregator(metricsManager, allPartitions);
        return new CompletedFetch(
                logContext,
                subscriptions,
                BufferSupplier.create(),
                tp,
                partitionData,
                metricsAggregator,
                0L,
                ApiKeys.FETCH.latestVersion());
    }
Tests that the buffer manipulates partitions for both the queue and the next-in-line buffer.
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetchBufferTest.java