SafeIterableMap implements Iterable<Map.Entry<K, V>> { public Map.Entry<K, V> newest() { return mEnd; }  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 testNewest() { SafeIterableMap<Integer, Boolean> map = mapOf(); assertThat(map.newest(), nullValue()); map.putIfAbsent(1, false); assertThat(map.newest().getKey(), is(1)); map.putIfAbsent(2, false); assertThat(map.newest().getKey(), is(2)); map.remove(2); assertThat(map.eldest().getKey(), is(1)); map.remove(1); assertThat(map.newest(), nullValue()); }