@Test
    void testSortOrder2() {
        final ValueStoreKey valueStoreKey = new ValueStoreKey(123, (short) 0);

        lmdbEnv.doWithWriteTxn(writeTxn -> {
            rangeStoreDb.put(
                    writeTxn, RangeStoreKey.of(UID_1, 1, 10), valueStoreKey, false);
            rangeStoreDb.put(
                    writeTxn,
                    RangeStoreKey.of(UID_1, Long.MAX_VALUE - 10, Long.MAX_VALUE),
                    valueStoreKey,
                    false);
        });

        rangeStoreDb.logDatabaseContents(LOGGER::debug);

        final AtomicReference<Range<Long>> lastRangeRef = new AtomicReference<>();
        lmdbEnv.doWithReadTxn(readTxn -> {
            rangeStoreDb.forEachEntry(readTxn, entry -> {
                final Range<Long> range = entry.getKey().getKeyRange();
                final Range<Long> lastRange = lastRangeRef.get();
                if (lastRange != null) {
                    Assertions.assertThat(range.getFrom())
                            .isGreaterThan(lastRange.getFrom());
                }
                lastRangeRef.set(range);
            });
        });
    }
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