@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
    LmdbUtils.doWithWriteTxn(lmdbEnv, 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();
    LmdbUtils.doWithReadTxn(lmdbEnv, 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();
        });
    });
}