### Question:
CompositeMap implements Map<KEYTYPE, VALUETYPE> { @Override public Set<java.util.Map.Entry<KEYTYPE, VALUETYPE>> entrySet() { Set<java.util.Map.Entry<KEYTYPE, VALUETYPE>> entries = new LinkedHashSet<Map.Entry<KEYTYPE, VALUETYPE>>(); for (Map<KEYTYPE, VALUETYPE> delegate : delegates) { entries.addAll(delegate.entrySet()); } return entries; }  @SuppressWarnings("unchecked") CompositeMap<KEYTYPE, VALUETYPE> addDelegate(Map<KEYTYPE, VALUETYPE> delegate); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set<java.util.Map.Entry<KEYTYPE, VALUETYPE>> entrySet(); @Override VALUETYPE get(Object key); @Override Object clone(); @Override boolean isEmpty(); @Override Set<KEYTYPE> keySet(); @Override VALUETYPE put(KEYTYPE key, VALUETYPE value); @Override void putAll(Map<? extends KEYTYPE, ? extends VALUETYPE> map); @Override VALUETYPE remove(Object key); @Override int size(); @Override Collection<VALUETYPE> values();  }### Answer:
@Test public void testEntrySet() { CompositeMap<String, String> map = new CompositeMap<String, String>(); HashMap<String, String> delegate = new HashMap<String, String>(); delegate.put("foo", "bar"); map.addDelegate(delegate); Set<Entry<String, String>> entries = map.entrySet(); Assert.assertNotNull(entries); for (Entry<String, String> entry : entries) { Assert.assertEquals("foo", entry.getKey()); Assert.assertEquals("bar", entry.getValue()); } }