@Override
    public V put(@Nullable final K key, final V value) {
        if (key == null) {
            if (nullEntry == null) {
                _size += 1;
                nullEntry = new Entry<>(null, value);
                return null;
            }
            return nullEntry.setValue(value);
        }
        final Entry<K, V>[] table = this.table;
        final int hash = key.hashCode();
        final int index = HashUtil.indexFor(hash, table.length, mask);

        for (Entry<K, V> e = table[index]; e != null; e = e.hashNext) {
            final K entryKey;
            if ((entryKey = e.key) == key || entryKey.equals(key)) {
                return e.setValue(value);
            }
        }

        final Entry<K, V> e = new Entry<>(key, value);
        e.hashNext = table[index];
        table[index] = e;
        _size += 1;

        if (_size > capacity) {
            rehash(HashUtil.nextCapacity(capacity));
        }
        return null;
    }
@Test
    public void testCopy() {
        final HashMap<Integer, String> tested = new HashMap<>();
        tested.put(7, "a");
        tested.put(8, "b");
        HashMap<Integer, String> copy = new HashMap<>(tested);
        Assert.assertEquals("a", copy.get(7));
        Assert.assertEquals("b", copy.get(8));
        Assert.assertEquals(2, copy.size());
    }