private void addUserDataToMockReferenceDataLoader(final DocRef pipelineRef,
                                                      final EffectiveMetaSet effectiveStreams,
                                                      final List<String> mapNames,
                                                      final Map<RefStreamDefinition, Runnable> mockLoaderActions) {

        for (EffectiveMeta effectiveStream : effectiveStreams) {

            RefStreamDefinition refStreamDefinition = new RefStreamDefinition(
                    pipelineRef, pipelineStore.readDocument(pipelineRef).getVersion(), effectiveStream.getId());


            mockLoaderActions.put(refStreamDefinition, () -> {
                refDataStore.doWithLoaderUnlessComplete(
                        refStreamDefinition, effectiveStream.getEffectiveMs(), refDataLoader -> {

                            refDataLoader.initialise(false);
                            for (String mapName : mapNames) {
                                MapDefinition mapDefinition = new MapDefinition(refStreamDefinition, mapName);
                                doLoaderPut(refDataLoader,
                                        mapDefinition,
                                        USER_1,
                                        buildValue(mapDefinition, VALUE_1));
                                doLoaderPut(refDataLoader,
                                        mapDefinition,
                                        USER_2,
                                        buildValue(mapDefinition, VALUE_2));
                            }
                            refDataLoader.completeProcessing();
                        });
            });
        }
    }
Make sure that it copes with a map not being in an early stream but is in a later one.
stroom-app/src/test/java/stroom/pipeline/refdata/TestReferenceData.java