@Test
    void testGet_sameHashCodes() {
        // We have to set up the DB with the basic hash func so we can be assured of hash clashes
        setupValueStoreDb(basicHashAlgorithm);

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

        String val1str = "AaAa";
        String val2str = "BBBB";
        String val3str = "AaBB";
        String val4str = "BBAa";

        assertThat(val1str.hashCode()).isEqualTo(val2str.hashCode());
        assertThat(val1str.hashCode()).isEqualTo(val3str.hashCode());
        assertThat(val1str.hashCode()).isEqualTo(val4str.hashCode());

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

        // load 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)));
            valueToKeyMap.put(val4str, getOrCreate(writeTxn, StringValue.of(val4str)));
        });

        // should have four different id values as all have the same hashcode
        assertThat(
                valueToKeyMap.values().stream()
                        .map(ValueStoreKey::getUniqueId)
                        .collect(Collectors.toList()))
                .contains((short) 0, (short) 1, (short) 2, (short) 3);

        assertThat(valueStoreDb.getEntryCount()).isEqualTo(valueToKeyMap.size());

        ValueStoreKeySerde keySerde = new ValueStoreKeySerde();

        lmdbEnv.doWithReadTxn(txn -> {
            // lookup our entries
            List<Integer> ids = new ArrayList<>();
            valueStoreDb.getPooledKeyBuffer().doWithByteBuffer(keyBuffer -> {
                valueToKeyMap.forEach((valueStr, valueStoreKey) -> {
                    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);
                });
            });
        });
    }
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