### Question:
LinkedHashTreeMap extends AbstractMap<K, V> implements Serializable { @Override public void clear() { Arrays.fill(table, null); size = 0; modCount++; Node<K, V> header = this.header; for (Node<K, V> e = header.next; e != header; ) { Node<K, V> next = e.next; e.next = e.prev = null; e = next; } header.next = header.prev = header; } LinkedHashTreeMap(); @SuppressWarnings({ "unchecked", "rawtypes" // Unsafe! if comparator is null, this assumes K is comparable. })  LinkedHashTreeMap(Comparator<? super K> comparator); @Override int size(); @Override V get(Object key); @Override boolean containsKey(Object key); @Override V put(K key, V value); @Override void clear(); @Override V remove(Object key); @Override Set<Entry<K, V>> entrySet(); @Override Set<K> keySet();  }### Answer:
@Test public void clear() { LinkedHashTreeMap<String, String> map = new LinkedHashTreeMap<>(); map.put("a", "android"); map.put("c", "cola"); map.put("b", "bbq"); map.clear(); assertThat(map.keySet()).containsExactly(); assertThat(map).isEmpty(); }