@Test
    void testGet_simple() {
        assertThat(valueStoreDb.getEntryCount()).isEqualTo(0);

        final String val1str = "value one";
        final String val2str = "value two";
        final String val3str = "value three";

        final Map<String, ValueStoreKey> valueToKeyMap = new HashMap<>();

        // load three entries
        lmdbEnv.doWithWriteTxn(writeTxn -> {
            valueToKeyMap.put(val1str, getOrCreate(writeTxn, StringValue.of(val1str)));
            valueToKeyMap.put(val2str, getOrCreate(writeTxn, StringValue.of(val2str)));
            valueToKeyMap.put(val3str, getOrCreate(writeTxn, StringValue.of(val3str)));
        });

        assertThat(valueStoreDb.getEntryCount()).isEqualTo(3);

        ValueStoreKeySerde keySerde = new ValueStoreKeySerde();

        lmdbEnv.doWithReadTxn(txn -> {
            // lookup our three entries
            valueToKeyMap.forEach((valueStr, valueStoreKey) -> {
                valueStoreDb.getPooledKeyBuffer().doWithByteBuffer(keyBuffer -> {
                    keySerde.serialize(keyBuffer, valueStoreKey);
                    ByteBuffer valueBuffer = valueStoreDb.getAsBytes(txn, keyBuffer).get();
                    RefDataValue val = refDataValueSerdeFactory.deserialize(valueBuffer, StringValue.TYPE_ID);
                    assertThat(val).isInstanceOf(StringValue.class);
                    assertThat(((StringValue) val).getValue()).isEqualTo(valueStr);
                });
            });

            // now try and get a value that doesn't exist
            valueStoreDb.getPooledKeyBuffer().doWithByteBuffer(keyBuffer -> {
                keySerde.serialize(keyBuffer, new ValueStoreKey(123456, (short) 99));
                Optional<RefDataValue> optRefDataValue = valueStoreDb.get(
                        txn,
                        keyBuffer,
                        StringValue.TYPE_ID);
                assertThat(optRefDataValue).isEmpty();
            });

        });
    }
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