@Test
    void testVerifyNumericKeyOrder() {

        // Ensure entries come back in the right order
        final List<Entry<Integer, String>> data = new ArrayList<>(List.of(
                Map.entry(1, "val1"),
                Map.entry(2, "val2"),
                Map.entry(3, "val3"),
                Map.entry(4, "val4")));

        Collections.shuffle(data, new Random(12345L));

        lmdbEnv.doWithWriteTxn(writeTxn -> {
            data.forEach(entry -> {
                basicLmdbDb3.put(writeTxn, entry.getKey(), entry.getValue(), false);
            });
        });

        final KeyRange<Integer> keyRangeAll = KeyRange.all();

        final List<Integer> output = lmdbEnv.getWithReadTxn(readTxn ->
                basicLmdbDb3.streamEntries(readTxn, keyRangeAll, stream ->
                        stream
                                .map(Entry::getKey)
                                .collect(Collectors.toList())));

        // Verify key order
        assertThat(output)
                .containsExactly(
                        1,
                        2,
                        3,
                        4);
    }
Comparing overwriting the same key N times vs putting N entries each with a different key
stroom-lmdb/src/test/java/stroom/lmdb/TestBasicLmdbDb.java