MapView implements Map<K, V> { public boolean containsKey(Object key) { return this.map.containsKey(key); } 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 testContainsKey() { assertFalse(this.testobj.containsKey("k1")); assertFalse(this.testobj.containsKey("k2")); assertFalse(this.testobj.containsKey("k3")); assertFalse(this.testobj.containsKey("v1")); assertFalse(this.testobj.containsKey("v2")); assertFalse(this.testobj.containsKey("v3")); this.source.put("k1", "v1"); assertTrue(this.testobj.containsKey("k1")); assertFalse(this.testobj.containsKey("k2")); assertFalse(this.testobj.containsKey("k3")); assertFalse(this.testobj.containsKey("v1")); assertFalse(this.testobj.containsKey("v2")); assertFalse(this.testobj.containsKey("v3")); this.source.put("k2", "v2"); assertTrue(this.testobj.containsKey("k1")); assertTrue(this.testobj.containsKey("k2")); assertFalse(this.testobj.containsKey("k3")); assertFalse(this.testobj.containsKey("v1")); assertFalse(this.testobj.containsKey("v2")); assertFalse(this.testobj.containsKey("v3")); this.source.put("k3", "v3"); assertTrue(this.testobj.containsKey("k1")); assertTrue(this.testobj.containsKey("k2")); assertTrue(this.testobj.containsKey("k3")); assertFalse(this.testobj.containsKey("v1")); assertFalse(this.testobj.containsKey("v2")); assertFalse(this.testobj.containsKey("v3")); }