private Records createRecords(final int recordCount) {
        ByteBuffer allocate = ByteBuffer.allocate(1024);

        try (MemoryRecordsBuilder builder = MemoryRecords.builder(allocate,
            Compression.NONE,
            TimestampType.CREATE_TIME,
            0)) {
            for (int i = 0; i < recordCount; i++)
                builder.append(0L, "key".getBytes(), ("value-" + i).getBytes());

            return builder.build();
        }
    }
Supplies the {@link Arguments} to {@link #testErrorInInitialize(int, RuntimeException)}.
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetchCollectorTest.java