title: Merging two Map<String, Integer> with Java 8 Stream API
body: <p>I have two (or more) <code>Map&lt;String, Integer&gt;</code> objects. I'd like to merge them with Java 8 Stream API in a way that values for common keys should be the maximum of the values.</p>
  
  <pre><code>@Test
  public void test14() throws Exception {
      Map&lt;String, Integer&gt; m1 = ImmutableMap.of("a", 2, "b", 3);
      Map&lt;String, Integer&gt; m2 = ImmutableMap.of("a", 3, "c", 4);
      List&lt;Map&lt;String, Integer&gt;&gt; list = newArrayList(m1, m2);
  
      Map&lt;String, Integer&gt; mx = list.stream()... // TODO
  
      Map&lt;String, Integer&gt; expected = ImmutableMap.of("a", 3, "b", 3, "c", 4);
      assertEquals(expected, mx);
  }
  </code></pre>
  
  <p>How can I make this test method green?</p>
  
  <p>I've played with <code>collect</code> and <code>Collectors</code> for a while without any success.</p>
  
  <p>(<code>ImmutableMap</code> and <code>newArrayList</code> are from Google Guava.)</p>