MultiMapLookup implements Map<String, String> { @Override public String get(Object key) { return maps.stream() .filter(m -> m.containsKey(String.valueOf(key))) .findFirst() .map(m -> String.valueOf(m.get(key))) .orElse(null); } MultiMapLookup();  MultiMapLookup(Map<String,String> map1, Map<String,String> map2); MultiMapLookup add(Map<String,String> map); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override String get(Object key); @Override String put(String key, String value); @Override String remove(Object key); @Override void putAll(Map<? extends String, ? extends String> m); @Override void clear(); @Override Set<String> keySet(); @Override Collection<String> values(); @Override Set<Entry<String, String>> entrySet(); @Override String toString();  }
@Test public void testGet() throws Exception { Map<String,String> m1 = new HashMap<>(); Map<String,String> m2 = new HashMap<>(); m1.put("a", String.valueOf(1L)); m2.put("b", "c"); MultiMapLookup mml = new MultiMapLookup(m1, m2); assertThat(mml.get("a")).isEqualTo("1"); }