protected void bulkLoadAndAssert(final List<RefStreamDefinition> refStreamDefinitions,
                                     final boolean overwriteExisting,
                                     final int commitInterval,
                                     final boolean doAsserts,
                                     final RefDataStore refDataStore) {

        long effectiveTimeMs = System.currentTimeMillis();
        AtomicInteger counter = new AtomicInteger();

        final List<String> mapNames = IntStream.rangeClosed(1, MAPS_PER_REF_STREAM_DEF)
                .boxed()
                .map(this::buildDefaultMapName)
                .collect(Collectors.toList());

        final List<Tuple3<MapDefinition, String, StringValue>> keyValueLoadedData = new ArrayList<>();
        final List<Tuple3<MapDefinition, Range<Long>, StringValue>> keyRangeValueLoadedData = new ArrayList<>();

        final AtomicReference<RefStreamDefinition> lastRefStreamDefinition = new AtomicReference<>(null);
        final AtomicInteger lastCounterStartVal = new AtomicInteger();

        refStreamDefinitions.forEach(refStreamDefinition -> {
            try {
                LOGGER.debug("Loading data for refStreamDef: {}", refStreamDefinition);
                final Tuple2<Long, Long> startEntryCounts = Tuple.of(
                        refDataStore.getKeyValueEntryCount(),
                        refDataStore.getRangeValueEntryCount());

                boolean isLoadExpectedToHappen = true;
                //Same stream def as last time so
                if (refStreamDefinition.equals(lastRefStreamDefinition.get())) {
                    counter.set(lastCounterStartVal.get());
                    isLoadExpectedToHappen = false;
                }
                lastCounterStartVal.set(counter.get());

                int putAttempts = loadData(
                        refDataStore,
                        refStreamDefinition,
                        effectiveTimeMs,
                        commitInterval,
                        mapNames,
                        overwriteExisting,
                        counter,
                        keyValueLoadedData,
                        keyRangeValueLoadedData,
                        isLoadExpectedToHappen);


                final Tuple2<Long, Long> endEntryCounts = Tuple.of(
                        refDataStore.getKeyValueEntryCount(),
                        refDataStore.getRangeValueEntryCount());

                int expectedNewEntries;
                if (refStreamDefinition.equals(lastRefStreamDefinition.get())) {
                    expectedNewEntries = 0;
                } else {
                    expectedNewEntries = putAttempts;
                }

                assertThat(endEntryCounts._1)
                        .isEqualTo(startEntryCounts._1 + expectedNewEntries);
                assertThat(endEntryCounts._2)
                        .isEqualTo(startEntryCounts._2 + expectedNewEntries);

                lastRefStreamDefinition.set(refStreamDefinition);

            } catch (Exception e) {
                throw new RuntimeException(e);
            }

//            refDataStore.logAllContents();

            ProcessingState processingState = refDataStore.getLoadState(refStreamDefinition)
                    .get();

            assertThat(processingState)
                    .isEqualTo(ProcessingState.COMPLETE);

        });

        if (ENTRIES_PER_MAP_DEF < 10) {
            refDataStore.logAllContents(LOGGER::info);
        }

        if (doAsserts) {
            LOGGER.info("Starting key value asserts");
            assertLoadedKeyValueData(keyValueLoadedData);
            LOGGER.info("Starting range value asserts");
            assertLoadedKeyRangeValueData(keyRangeValueLoadedData);
            LOGGER.info("Completed asserts");
        }
    }
@param refStreamDefinitionCount  Number of {@link RefStreamDefinition}s to create.
@param keyValueMapCount          Number of KeyValue type maps to create per {@link RefStreamDefinition}
@param rangeValueMapCount        Number of RangeValue type maps to create per {@link RefStreamDefinition}
@param entryCount                Number of map entries to create per map
@param refStreamDefinitionOffset The offset from zero for the refStreamDefinition partIndex
@return The created {@link RefStreamDefinition} objects
stroom-pipeline/src/test/java/stroom/pipeline/refdata/store/offheapstore/AbstractRefDataOffHeapStoreTest.java