### Question:
PatriciaTrie implements Map<String, V> { @Override public void putAll(Map<? extends String, ? extends V> map) { for (Entry<? extends String, ? extends V> entry : map.entrySet()) { put(entry.getKey(), entry.getValue()); } } PatriciaTrie(); @Override V get(Object key); @Override V put(String key, V value); @Override void putAll(Map<? extends String, ? extends V> map); @Override V remove(Object key); @Override boolean containsKey(Object key); @Override Set<String> keySet(); @Override Collection<V> values(); boolean containsKeyPrefix(String prefix); @Override int size(); @Override boolean isEmpty(); @Override void clear(); @Override boolean containsValue(Object value); @Override Set<Entry<String, V>> entrySet(); PatriciaNode<V> getRoot(); KeyMapper<String> getKeyMapper();  }### Answer:
@Test public void testPutAll() { Map<String, String> randoms = new HashMap<>(); for (int i = 0; i < 1000; i++) { String random = UUID.randomUUID().toString(); randoms.put(random, random); } PatriciaTrie<String> trie = new PatriciaTrie<>(); trie.putAll(randoms); for (Map.Entry<String, String> random : randoms.entrySet()) { assertEquals(random.getValue(), trie.get(random.getKey())); assertTrue(trie.containsKey(random.getKey())); } }
@Test public void testPutAll() { Map<String, String> randoms = new HashMap<>(); for (int i = 0; i < 10000; i++) { String random = UUID.randomUUID().toString(); randoms.put(random, random); } PatriciaTrie<String> trie = new PatriciaTrie<>(); trie.putAll(randoms); for (Map.Entry<String, String> random : randoms.entrySet()) { assertEquals(random.getValue(), trie.get(random.getKey())); assertTrue(trie.containsKey(random.getKey())); } }