public static List<LogEntry> mockEntries(final int n) {
        List<LogEntry> entries = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            LogEntry entry = mockEntry(i, i);
            if (i > 0) {
                entry.setData(ByteBuffer.wrap(String.valueOf(i).getBytes()));
            }
            entries.add(entry);
        }
        return entries;
    }
Test helper
@author boyan (boyan@alibaba-inc.com)

2018-Apr-11 10:16:07 AM
jraft-extension/rpc-grpc-impl/src/test/java/com/alipay/sofa/jraft/test/TestUtils.java