SafeIterableMap implements Iterable<Map.Entry<K, V>> { public IteratorWithAdditions iteratorWithAdditions() { @SuppressWarnings("unchecked") IteratorWithAdditions iterator = new IteratorWithAdditions(); mIterators.put(iterator, false); return iterator; }  V putIfAbsent(@NonNull K key, @NonNull V v); V remove(@NonNull K key); int size(); @NonNull @Override Iterator<Map.Entry<K, V>> iterator(); Iterator<Map.Entry<K, V>> descendingIterator(); IteratorWithAdditions iteratorWithAdditions(); Map.Entry<K, V> eldest(); Map.Entry<K, V> newest(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testIteratorWithAdditionEmpty() { SafeIterableMap<Integer, Boolean> map = mapOf(); Iterator<Entry<Integer, Boolean>> iterator = map.iteratorWithAdditions(); assertThat(iterator.hasNext(), is(false)); }