@SuppressWarnings("unchecked")
    public V put(int key, V value) {
        byte[] states = this.states;
        int[] keys = this.keys;
        int mask = keys.length - 1;
        int i = key & mask;

        while (states[i] > FREE) { // states[i] == FULL
            if (keys[i] == key) {
                V oldValue = (V) values[i];
                values[i] = value;
                return oldValue;
            }
            i = (i + 1) & mask;
        }
        byte oldState = states[i];
        states[i] = FULL;
        keys[i] = key;
        values[i] = value;
        ++size;
        if (oldState == FREE && --free < 0)
            resize(Math.max(capacity(size), keys.length));
        return null;
    }
@Test
    public void testPut() {
        removeOdd();
        for (int i = 0; i < 45; i++)
            map.put(i, Integer.valueOf(i));
        assertEquals(45, map.size());
        for (int i = 0; i < 45; i++)
            assertEquals(Integer.valueOf(i), map.get(i));
    }