private void runProcessing(final int dataFileCount, final OptionalInt maxDocsPerShard) {
        // Translate data.
        List<ProcessorResult> results = commonTranslationTestHelper.processAll();

        // 3 ref data streams plus our data streams
        int expectedTaskCount = 3 + dataFileCount;

        assertThat(results.size())
                .isEqualTo(expectedTaskCount);
        results.forEach(this::assertProcessorResult);

        // Add index.
        storeCreationTool.addIndex("Test index", INDEX_XSLT, maxDocsPerShard);
        // Translate data.
        results = commonTranslationTestHelper.processAll();
        assertThat(results.size()).isEqualTo(N1);

        results.forEach(this::assertProcessorResult);

        // Flush all newly created index shards.
        indexShardManager.performAction(FindIndexShardCriteria.matchAll(), IndexShardAction.FLUSH);
    }
Class to create test data for use in all search tests.
stroom-app/src/test/java/stroom/search/CommonIndexingTestHelper.java