public DocRef addReferenceData(final String feedName,
                                   final TextConverterType textConverterType,
                                   final Path textConverterLocation,
                                   final Path xsltLocation,
                                   final Path dataLocation) {
        commonTestControl.createRequiredXMLSchemas();

        final DocRef referenceFeed = getRefFeed(feedName, textConverterType, textConverterLocation, xsltLocation);

        // We need to ensure the reference data is older then the earliest event
        // we are going to see.
        ZonedDateTime dateTime = ZonedDateTime.now(ZoneOffset.UTC);
        dateTime = dateTime.withYear(OLD_YEAR);
        long effectiveMs = dateTime.toInstant().toEpochMilli();

        // Always make sure effective date is unique.
        effectiveMs += effectiveMsOffset++;

        // Add the associated data to the stream store.
        final MetaProperties metaProperties = MetaProperties.builder()
                .feedName(referenceFeed.getName())
                .typeName(StreamTypeNames.RAW_REFERENCE)
                .createMs(effectiveMs)
                .build();

        final String data = StreamUtil.fileToString(dataLocation);

        Meta meta;

        try (final Target target = store.openTarget(metaProperties)) {
            meta = target.getMeta();
            TargetUtil.write(target, data);
        } catch (final IOException e) {
            throw new RuntimeException(e.getMessage(), e);
        }

        try (final Source checkSource = store.openSource(meta.getId())) {
            assertThat(SourceUtil.readString(checkSource)).isEqualTo(data);
        } catch (final IOException e) {
            throw new RuntimeException(e.getMessage(), e);
        }

        return referenceFeed;
    }
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