public void run(final boolean shutdown) {
        // Create sample users [optional].
        createSampleUsers();

        checkVolumesExist();

        // Sample data/config can exist in many projects so here we define all
        // the root directories that we want to
        // process
        final Path coreServerSamplesDir = StroomCoreServerTestFileUtil.getTestResourcesDir()
                .resolve(ROOT_DIR_NAME);
        final Path statisticsSamplesDir = Paths.get("./stroom-statistics/stroom-statistics-impl/src/test/resources")
                .resolve(ROOT_DIR_NAME);

        final Path[] rootDirs = new Path[]{
                coreServerSamplesDir,
                statisticsSamplesDir};

        // Load various streams that we generate on the fly
        sampleDataGenerator.generateData(coreServerSamplesDir.resolve("generated").resolve("input"));

        // process each root dir in turn, importing content and loading data into feeds
        for (final Path dir : rootDirs) {
            loadDirectory(shutdown, dir);
        }

        // Add volumes to all indexes.
        final List<DocRef> indexList = indexStore.list();
        logDocRefs(indexList, "indexes");

        final List<DocRef> feeds = getSortedDocRefs(feedStore::list);

        logDocRefs(feeds, "feeds");

        generateSampleStatisticsData();

        // code to check that the statisticsDataSource objects are stored
        // correctly
        final List<DocRef> statisticsDataSources = getSortedDocRefs(statisticStoreStore::list);
        logDocRefs(statisticsDataSources, "statisticStores");

        final List<DocRef> stroomStatsStoreEntities = getSortedDocRefs(stroomStatsStoreStore::list);
        logDocRefs(stroomStatsStoreEntities, "stroomStatsStores");

        createProcessorFilters(feeds);

//        if (shutdown) {
//            commonTestControl.shutdown();
//        }
    }
Script to create some base data for testing.
stroom-app/src/test/java/stroom/test/SetupSampleDataBean.java