### Question:
CompactHashMap implements Map<K, V> { @Override public V put(K key, V value) { if (table.length * loadFactor <= filled) { resize(); } return insert(key, value, codeFor(key), null); } CompactHashMap();  CompactHashMap(int initialCapacity);  CompactHashMap(int initialCapacity, float loadFactor); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V put(K key, V value); @Override V remove(Object key); @Override void putAll(Map<? extends K, ? extends V> m); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Map.Entry<K, V>> entrySet();  }### Answer:
@Test void ensureResizingFromZeroLengthWorks() { val map = createMap(0); map.put("1", "2"); }