@Test
    void testAppending_outOfOrder_NoOverwrite() {

        basicLmdbDb.put("key2", "val2", false, true);
        // dup
        basicLmdbDb.put("key2", "val2", false, true);
        basicLmdbDb.put("key1", "val1", false, true);

        assertThat(basicLmdbDb.getEntryCount())
                .isEqualTo(1);
        lmdbEnv.doWithReadTxn(readTxn -> {
            final List<Entry<String, String>> entries = basicLmdbDb.streamEntries(
                    readTxn,
                    KeyRange.all(), Stream::toList);

            assertThat(entries)
                    .extracting(Entry::getKey)
                    .containsExactly("key2");
            assertThat(entries)
                    .extracting(Entry::getValue)
                    .containsExactly("val2");
        });
    }
This test is an example of how to abuse LMDB. If run it will crash the JVM
as a direct bytebuffer returned from a get() was mutated outside the transaction.
stroom-lmdb/src/test/java/stroom/lmdb/TestBasicLmdbDb.java