@Test
    void testReferenceNonAggregation() {
        streamStore.clear();

        final String feedName = FileSystemTestUtil.getUniqueTestString();
        final DocRef feedRef = feedStore.createDocument(feedName);
        final FeedDoc feedDoc = feedStore.readDocument(feedRef);
        feedDoc.setReference(true);
        feedStore.writeDocument(feedDoc);

        final AttributeMap attributeMap = new AttributeMap();
//        attributeMap.put(StandardHeaderArguments.FEED, feedName);
//        attributeMap.put(StandardHeaderArguments.TYPE, StreamTypeNames.RAW_REFERENCE);

        final StreamTargetStreamHandlers streamTargetStreamHandlers = new StreamTargetStreamHandlers(
                streamStore,
                feedProperties,
                metaService,
                null,
                volumeGroupNameProvider);
        final ProgressHandler progressHandler = new ProgressHandler("Test");
        streamTargetStreamHandlers.handle(feedName, StreamTypeNames.RAW_EVENTS, attributeMap, handler -> {
            try {
                handler.addEntry("1" + StroomZipFileType.META.getDotExtension(),
                        new ByteArrayInputStream(new byte[0]), progressHandler);
                handler.addEntry("1" + StroomZipFileType.CONTEXT.getDotExtension(),
                        new ByteArrayInputStream(new byte[0]), progressHandler);
                handler.addEntry("1" + StroomZipFileType.DATA.getDotExtension(),
                        new ByteArrayInputStream(new byte[0]), progressHandler);
                handler.addEntry("2" + StroomZipFileType.META.getDotExtension(),
                        new ByteArrayInputStream(new byte[0]), progressHandler);
                handler.addEntry("2" + StroomZipFileType.CONTEXT.getDotExtension(),
                        new ByteArrayInputStream(new byte[0]), progressHandler);
                handler.addEntry("2" + StroomZipFileType.DATA.getDotExtension(),
                        new ByteArrayInputStream(new byte[0]), progressHandler);
            } catch (final IOException e) {
                throw new UncheckedIOException(e);
            }
        });

        assertThat(streamStore.getStreamStoreCount()).isEqualTo(2);
    }
This test is used to check that feeds that are set to be reference feeds
do not aggregate streams.

@throws IOException
stroom-app/src/test/java/stroom/receive/TestStreamTargetStreamHandler.java