private void doForEachTest(final UID uid, final int expectedEntryCount) throws Exception {
        try (final BatchingWriteTxn batchingWriteTxn = lmdbEnv.openBatchingWriteTxn(2)) {
            AtomicInteger cnt = new AtomicInteger(0);
            rangeStoreDb.deleteMapEntries(
                    batchingWriteTxn,
                    uid,
                    (writeTxn2, keyBuf, valBuf) -> {
                        cnt.incrementAndGet();
                        LOGGER.info("{} {}",
                                ByteBufferUtils.byteBufferInfo(keyBuf),
                                ByteBufferUtils.byteBufferInfo(valBuf));
                    });

            assertThat(cnt).hasValue(expectedEntryCount);
        }
    }
Make sure that the entries are stored in the db in the order we expect.
stroom-pipeline/src/test/java/stroom/pipeline/refdata/store/offheapstore/databases/TestRangeStoreDb.java