### Question:
HashMap extends Map<K, V> { @Override public boolean containsKey(K key) { HashMapEntry<K, V> m = getEntry(key); return m != null; } HashMap();  HashMap(int capacity);  HashMap(int capacity, float loadFactor);  HashMap(Map<K, V> map); @Override void clear(); @Override boolean containsKey(K key); @Override boolean containsValue(V value); @Override Set<MapEntry<K, V>> entrySet(); @Override V get(K key); @Override boolean isEmpty(); @Override Set<K> keySet(); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> map); @Override V remove(K key); @Override int size(); @Override Collection<V> values();  }### Answer:
@Test public void testContainsKey() { assertTrue("Returned false for valid key", hm.containsKey(Integers.toString(876))); assertTrue("Returned true for invalid key", !hm.containsKey("KKDKDKD")); }