public static ByteBuffer toBuffer(UnalignedRecords records) {
        return toBuffer(records.toSend());
    }
Checks the two iterables for equality by first converting both to a list.
clients/src/test/java/org/apache/kafka/test/TestUtils.java