private Stream<DataRecord> generateDataRows() {

            Function<Integer, DataRecord> toRecordMapper = integer -> {
                List<String> values = fieldDefinitions.stream()
                        .map(field -> {
                            try {
                                return field.getNext(random, faker);
                            } catch (Exception e) {
                                throw new RuntimeException(Utils.message("Error getting next value for field {}, {}",
                                        field.getName(), e.getMessage()), e);
                            }
                        })
                        .collect(Collectors.toList());
                return new DataRecord(fieldDefinitions, values);
            };

            IntStream stream = IntStream.rangeClosed(1, rowCount);

            if (isParallel) {
                stream = stream.parallel();
            } else {
                stream = stream.sequential();
            }

            return stream
                    .boxed()
                    .map(toRecordMapper);
        }
Holder class for the static class names list to allow for lazy initialisation
stroom-test-common/src/main/java/stroom/test/common/data/DataGenerator.java