SafeIterableMap implements Iterable<Map.Entry<K, V>> { @NonNull @Override public Iterator<Map.Entry<K, V>> iterator() { ListIterator<K, V> iterator = new AscendingIterator<>(mStart, mEnd); 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 testIteratorEmpty() { SafeIterableMap<Integer, Boolean> map = mapOf(); Iterator<Entry<Integer, Boolean>> iterator = map.iterator(); assertThat(iterator.hasNext(), is(false)); }