MapView implements Map<K, V> { public boolean equals(Object obj) { return this.map.equals(obj); } MapView(Map<K, V> map); void clear(); boolean containsKey(Object key); boolean containsValue(Object value); Set<Map.Entry<K, V>> entrySet(); boolean equals(Object obj); V get(Object key); int hashCode(); boolean isEmpty(); Set<K> keySet(); V put(K key, V value); void putAll(Map<? extends K, ? extends V> map); V remove(Object key); int size(); Collection<V> values(); String toString();  }
@Test public void testEquals() { Map comp = new HashMap(); assertTrue(this.testobj.equals(comp)); for (int i = 0; i < 5; ++i) { this.source.put("k" + i, "v" + i); assertFalse(this.testobj.equals(comp)); comp.put("k" + i, "value"); assertFalse(this.testobj.equals(comp)); comp.put("k" + i, "v" + i); assertTrue(this.testobj.equals(comp)); } this.source.clear(); assertFalse(this.testobj.equals(comp)); comp.clear(); assertTrue(this.testobj.equals(comp)); }