private void generateSampleStatisticsData() {
        final DataLoader dataLoader = new DataLoader(feedProperties, streamTargetStreamHandlers);
        final long startTime = System.currentTimeMillis();

        //keep the big and small feeds apart in terms of their event times
        final Instant startOfToday = Instant.now().truncatedTo(ChronoUnit.DAYS);
        final Instant startOfAWeekAgo = startOfToday.minus(7, ChronoUnit.DAYS);

        final List<CompletableFuture<Void>> futures = new ArrayList<>();

        futures.add(CompletableFuture.runAsync(() -> {
            loadStatsData(
                    dataLoader,
                    STATS_COUNT_FEED_LARGE_NAME,
                    STATS_ITERATIONS_LARGE,
                    startOfAWeekAgo,
                    GenerateSampleStatisticsData::generateCountData);
        }));

        futures.add(CompletableFuture.runAsync(() -> {
            loadStatsData(
                    dataLoader,
                    STATS_COUNT_FEED_SMALL_NAME,
                    STATS_ITERATIONS_SMALL,
                    startOfToday,
                    GenerateSampleStatisticsData::generateCountData);
        }));

        futures.add(CompletableFuture.runAsync(() -> {
            loadStatsData(
                    dataLoader,
                    STATS_VALUE_FEED_LARGE_NAME,
                    STATS_ITERATIONS_LARGE,
                    startOfAWeekAgo,
                    GenerateSampleStatisticsData::generateValueData);
        }));

        futures.add(CompletableFuture.runAsync(() -> {
            loadStatsData(
                    dataLoader,
                    STATS_VALUE_FEED_SMALL_NAME,
                    STATS_ITERATIONS_SMALL,
                    startOfToday,
                    GenerateSampleStatisticsData::generateValueData);
        }));

        futures.add(CompletableFuture.runAsync(() -> {
            try {
                final String sampleData = new String(Files.readAllBytes(Paths.get(STATS_COUNT_API_DATA_FILE)));
                dataLoader.loadInputStream(
                        STATS_COUNT_API_FEED_NAME,
                        "Sample statistics count data for export to API",
                        null,
                        StreamUtil.stringToStream(sampleData),
                        false,
                        startTime);
            } catch (final RuntimeException | IOException e) {
                LOGGER.warn("Feed {} does not exist so cannot load the sample count for export to API statistics data.",
                        STATS_COUNT_API_FEED_NAME);
            }
        }));

        LOGGER.info("Waiting for {} async tasks to complete", futures.size());
        CompletableFuture.allOf(futures.toArray(CompletableFuture[]::new)).join();
        LOGGER.info("Completed generation");
    }
Generates some sample statistics data in two feeds. If the feed doesn't
exist it will fail silently
stroom-app/src/test/java/stroom/test/SetupSampleDataBean.java