### Question:
MyHashMap { public V put(K key, V value) { if (key == null) { throw new NullPointerException("Key should not be NULL!"); } if (++size > length * loadFactor) { rehash(); } int hash = hash(key); int bucketIndex = bucketIndexFor(hash); for (Entry<K, V> e = table[bucketIndex]; e != null; e = e.next) { if (e.key == key || e.key.equals(key)) { V oldValue = e.value; e.value = value; return oldValue; } } Entry<K, V> newEntry = new Entry<>(key, value); newEntry.next = table[bucketIndex]; table[bucketIndex] = newEntry; return value; } MyHashMap();  MyHashMap(int intiCapacity);  MyHashMap(int intiCapacity, HashStrategy<K> hashStrategy); int length(); V put(K key, V value); V get(K key); void printViewable();  }### Answer:
@Test(expected = NullPointerException.class) public void testPutNullKey() { MyHashMap<String, String> map = new MyHashMap<>(); map.put(null, "123"); }