@Override public long put(long key, long value) {
        assert value != nullValue : "put() called with null-sentinel value " + nullValue;
        SlotAssignmentResult slot = hsa.ensure(key);
        long result;
        if (!slot.isNew()) {
            result = mem.getLong(slot.address());
        } else {
            result = nullValue;
        }
        mem.putLong(slot.address(), value);
        return result;
    }
@Test
    public void testPut() {
        long key = newKey();
        long value = newValue();
        assertEqualsKV(MISSING_VALUE, map.put(key, value), key, value);

        long newValue = newValue();
        long oldValue = map.put(key, newValue);
        assertEqualsKV(value, oldValue, key, value);
    }