public void test(List<ApiMessageAndVersion> fromRecords) {
            D finalImageDelta = createDeltaUponImage(getEmptyImage());
            RecordTestUtils.replayAll(finalImageDelta, fromRecords);
            I finalImage = createImageByApplyingDelta(finalImageDelta);

            test(finalImage, fromRecords);
        }
Tests applying records in all variations of batch sizes will result in the same image as applying all records in one batch.
@param fromRecords    The list of records to apply.
metadata/src/test/java/org/apache/kafka/metadata/RecordTestUtils.java