private DocRef getRefFeed(final String feedName, final TextConverterType textConverterType,
                              final Path textConverterLocation, final Path xsltLocation) {
        DocRef docRef;
        final List<DocRef> docRefs = feedStore.findByName(feedName);
        if (docRefs.size() > 0) {
            docRef = docRefs.get(0);

        } else {
            // Setup the feeds in mock feed configuration manager.
            docRef = createFeed(feedName);
//            docRef = feedStore.createDocument(feedName);
            final FeedDoc feedDoc = feedStore.readDocument(docRef);
            feedDoc.setReference(true);
            feedDoc.setDescription("Description " + feedName);
            feedDoc.setStatus(FeedStatus.RECEIVE);
            feedStore.writeDocument(feedDoc);

            // Setup the pipeline.
            final DocRef pipelineRef = getReferencePipeline(feedName, textConverterType,
                    textConverterLocation, xsltLocation);

            // Setup the stream processor filter.
            final QueryData findStreamQueryData = QueryData.builder()
                    .dataSource(MetaFields.STREAM_STORE_DOC_REF)
                    .expression(ExpressionOperator.builder()
                            .addTextTerm(MetaFields.FEED, ExpressionTerm.Condition.EQUALS, feedDoc.getName())
                            .addTextTerm(MetaFields.TYPE,
                                    ExpressionTerm.Condition.EQUALS,
                                    StreamTypeNames.RAW_REFERENCE)
                            .build())
                    .build();
            processorFilterService.create(
                    CreateProcessFilterRequest
                            .builder()
                            .pipeline(pipelineRef)
                            .queryData(findStreamQueryData)
                            .priority(2)
                            .build());
        }

        return docRef;
    }
Adds reference data to a stream store.

@param feedName              The feed name to use.
@param textConverterType     Type of text converter
@param textConverterLocation The Text Converter location
@param xsltLocation          The XSLT location
@param dataLocation          The reference data location.
@return A reference feed definition.
stroom-app/src/test/java/stroom/test/StoreCreationTool.java