public DocRef createIndex(final String name, final List<LuceneIndexField> indexFields, final int maxDocsPerShard) {
        // Create a test index.
        final DocRef indexRef = indexStore.createDocument(name);
        final LuceneIndexDoc index = indexStore.readDocument(indexRef);

        // Update the index
        index.setMaxDocsPerShard(maxDocsPerShard);
        index.setFields(indexFields);
        index.setVolumeGroupName(VolumeCreator.DEFAULT_VOLUME_GROUP);
        indexStore.writeDocument(index);
        assertThat(index).isNotNull();
        return indexRef;
    }
Help class to create some basic scenarios for testing.
stroom-app/src/test/java/stroom/test/CommonTestScenarioCreator.java