@Test
    void testKeyOrder() {

        // Ensure entries come back in the right order
        long hash = 123456789;
        final List<Entry<ValueStoreKey, RefDataValue>> data = IntStream.rangeClosed(0, 1001)
                .boxed()
                .map(i -> {
                    return Map.entry(
                            new ValueStoreKey(hash, Short.parseShort(Integer.toString(i))),
                            (RefDataValue) new StringValue("val" + i));

                })
                .toList();

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

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

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

        Assertions.assertThat(output)
                .containsExactlyElementsOf(data.stream()
                        .map(Entry::getKey)
                        .collect(Collectors.toList()));
    }
Generate a list (of size desiredRecords) of strings that all share the same hashcode
Adapted from https://gist.github.com/vaskoz/5703423
stroom-pipeline/src/test/java/stroom/pipeline/refdata/store/offheapstore/databases/TestValueStoreDb.java