### Question:
NoRandomAccessMap implements Recyclable, Iterable<NoRandomAccessMap.Entry<K, V>> { public void copyFrom(NoRandomAccessMap<K, V> other) { resetState(); for (Entry<K, V> entry : other) { this.add(entry.getKey(), entry.getValue()); } }  void add(K key, @Nullable V value); int size(); boolean isEmpty(); @Override void resetState(); @Override java.util.Iterator<NoRandomAccessMap.Entry<K, V>> iterator(); void copyFrom(NoRandomAccessMap<K, V> other);  }### Answer:
@Test void testCopyFrom() { map.add(String.valueOf(0), "value"); map.add(String.valueOf(1), "value"); NoRandomAccessMap<String, String> copy = new NoRandomAccessMap<>(); copy.add("foo", "bar"); copy.copyFrom(map); int index = 0; int numElements = 0; for (NoRandomAccessMap.Entry entry : copy) { numElements++; assertThat(entry.getKey()).isEqualTo(String.valueOf(index++)); assertThat(entry.getValue()).isEqualTo("value"); } assertThat(numElements).isEqualTo(2); }