### Question:
Trie implements Map.Entry<String, V>, Iterable<Map.Entry<String, V>>, Serializable { public V put(String key, V value) { Validate.notEmpty(key, "key must not be empty"); Trie<V> node = getNode(key, true); V oldValue = node.value; node.value = value; return oldValue; } Trie(); private  Trie(char character, Trie<V> parent); Trie<V> getNode(CharSequence key); V put(String key, V value); V get(String key); V getOrPut(String key, V value); V getOrPut(String key, Factory<V> valueFactory); @Override V getValue(); @Override V setValue(V value); @Override String getKey(); boolean clean(); @Override Iterator<Map.Entry<String, V>> iterator(); int size(); @Override String toString();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testInsertEmptyKey() { Trie<Integer> trie = new Trie<Integer>(); trie.put("", 1); }
@Test(expected = NullPointerException.class) public void testInsertNullKey() { Trie<Integer> trie = new Trie<Integer>(); trie.put(null, 1); }