CascadingMap implements Map<K, V> { @Override public boolean containsKey(Object key) { for (Map<K, V> source : sources) { if (source.containsKey(key)) { return true; } } return false; } CascadingMap();  CascadingMap(Iterable<Map<K, V>> sources);  CascadingMap(Map<K, V>... sources); List<Map<K, V>> getSources(); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set<Map.Entry<K, V>> entrySet(); @Override V get(Object key); @Override boolean isEmpty(); @Override Set<K> keySet(); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> map); @Override V remove(Object key); @Override int size(); @Override Collection<V> values(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }
@Test public void test_containsKey_first() { assertTrue(cascading.containsKey("key0")); }
@Test public void test_containsKey_second() { assertTrue(cascading.containsKey("key2")); }
@Test public void test_containsKey_both() { assertTrue(cascading.containsKey("key1")); }
@Test public void test_containsKey_missing() { assertFalse(cascading.containsKey("key3")); }