private void generateRefDataForEffectiveDateTesting(final Path dir) {
        final String refFeed = "USER_TO_EFF_DATE-REFERENCE";
        final String eventsFeed = "TEST_REFERENCE_DATA_EFF_DATE-EVENTS";

        final int dateCount = 10;
        final int userCount = 10;
        final LocalDateTime startTime = LocalDateTime.of(
                2010, 1, 1, 0, 0, 0);
        LocalDateTime effectiveDateTime = startTime;

        for (int i = 1; i <= dateCount; i++) {
            final int finalI = i;
            final LocalDateTime finalEffectiveDateTime = effectiveDateTime;

            runAsync(() -> {
                final Path refFile = makeInputFilePath(dir, finalI, finalEffectiveDateTime, refFeed);
                LOGGER.info("Generating file {}", refFile.toAbsolutePath().normalize().toString());

                DataGenerator.buildDefinition()
                        .addFieldDefinition(DataGenerator.sequentiallyNumberedValueField(
                                "user",
                                "user%s",
                                1,
                                userCount + 1))
                        .addFieldDefinition(DataGenerator.sequentiallyNumberedValueField(
                                "effectiveDateTime",
                                "user%s-" + finalEffectiveDateTime.toString(),
                                1,
                                userCount + 1))
                        .setDataWriter(XmlAttributesDataWriterBuilder.builder()
                                .namespace("records:2")
                                .build())
                        .consumedBy(DataGenerator.getFileOutputConsumer(refFile))
                        .rowCount(userCount)
                        .generate();
            });
            effectiveDateTime = effectiveDateTime.plusDays(1);
        }


        runAsync(() -> {
            final Path eventsFile = makeInputFilePath(dir, 1, eventsFeed);
            LOGGER.info("Generating file {}", eventsFile.toAbsolutePath().normalize());

            DataGenerator.buildDefinition()
                    .addFieldDefinition(DataGenerator.sequentiallyNumberedValueField(
                            "user",
                            "user%s",
                            1,
                            userCount + 1))
                    .addFieldDefinition(DataGenerator.sequentialDateTimeField(
                            "time",
                            startTime.plusHours(1),
                            Duration.ofDays(1),
                            DateTimeFormatter.ISO_DATE_TIME))
                    .setDataWriter(XmlAttributesDataWriterBuilder.builder()
                            .namespace("records:2")
                            .build())
                    .consumedBy(DataGenerator.getFileOutputConsumer(eventsFile))
                    .rowCount(userCount)
                    .multiThreaded()
                    .generate();
        });
    }
To aid testing the generation without running {@link SetupSampleData}
stroom-app/src/test/java/stroom/test/SampleDataGenerator.java