@Test
    void testPurgeRefStream() {

        // two different ref stream definitions
        List<RefStreamDefinition> refStreamDefinitions = Arrays.asList(
                buildUniqueRefStreamDefinition(1),
                buildUniqueRefStreamDefinition(2),
                buildUniqueRefStreamDefinition(3),
                buildUniqueRefStreamDefinition(4));

        bulkLoadAndAssert(refStreamDefinitions, false, 1000);

        referenceDataConfig = referenceDataConfig.withPurgeAge(StroomDuration.ZERO);

        int entriesPerRefStream = MAPS_PER_REF_STREAM_DEF * ENTRIES_PER_MAP_DEF;

        assertThat(refDataStore.getProcessingInfoEntryCount())
                .isEqualTo(4);
        assertThat(refDataStore.getKeyValueEntryCount())
                .isEqualTo((long) refStreamDefinitions.size() * entriesPerRefStream);
        assertThat(refDataStore.getRangeValueEntryCount())
                .isEqualTo((long) refStreamDefinitions.size() * entriesPerRefStream);

        refDataStore.logAllContents(LOGGER::debug);

        LOGGER.info("------------------------purge-starts-here--------------------------------------");
        refDataStore.purge(2, 0);

        // We have purged one ref stream so there is now one less
        final int postPurgeRefStreamCount = refStreamDefinitions.size() - 1;

        assertThat(refDataStore.getProcessingInfoEntryCount())
                .isEqualTo(postPurgeRefStreamCount);
        assertThat(refDataStore.getKeyValueEntryCount())
                .isEqualTo((long) postPurgeRefStreamCount * entriesPerRefStream);
        assertThat(refDataStore.getRangeValueEntryCount())
                .isEqualTo((long) postPurgeRefStreamCount * entriesPerRefStream);
    }
Each task is trying to load data for a different {@link RefStreamDefinition} so they will all be fighting over
the write txn
stroom-pipeline/src/test/java/stroom/pipeline/refdata/store/offheapstore/TestRefDataOffHeapStore.java