### Question:
PatriciaTrie implements Map<String, V> { @Override public void clear() { root = new PatriciaNode<V>(null, null, -1); root.setLeft(root); entries = 0; } 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 testClear() { PatriciaTrie<String> trie = new PatriciaTrie<>(); assertTrue(trie.isEmpty()); assertEquals(0, trie.size()); trie.put("hello", "world"); trie.put("world", "hello"); assertFalse(trie.isEmpty()); trie.clear(); assertTrue(trie.isEmpty()); assertEquals(0, trie.size()); }