### Question:
SmallMap extends AbstractMap<K, V> { @Override public boolean containsKey(Object key) { rejectIfNull(key); if (entries != null) { return entries.containsKey(key); } return firstKey != null && firstKey.equals(key); } SmallMap(); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override V remove(Object key); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override void clear(); @Override int size(); @Override Set<Entry<K, V>> entrySet();  }### Answer:
@Test(expectedExceptions = { NullPointerException.class }) public void testContainsKeyRejectsNull() throws Exception { new SmallMap<Integer, String>().containsKey(null); }