### Question:
SmallMap extends AbstractMap<K, V> { @Override public void putAll(Map<? extends K, ? extends V> m) { for (Entry<? extends K, ? extends V> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } } 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(dependsOnMethods = { "testPutAndSize" }) public void testPutAll() throws Exception { final SmallMap<Integer, String> map = new SmallMap<>(); final HashMap<Integer, String> hashMap = new HashMap<>(); map.putAll(hashMap); assertEquals(map.size(), 0); hashMap.put(1, "one"); map.putAll(hashMap); assertEquals(map.size(), 1); assertEquals(map.get(1), "one"); }