TemplateParameters { public TemplateParameters setAll(final Map<String, Object> entries) { params.putAll(entries); return this; } TemplateParameters(final Map<String, Object> params);  TemplateParameters(); TemplateParameters set(final String key, final Object value); TemplateParameters setAll(final Map<String, Object> entries); Map<String, Object> get(); @Override String toString();  }
@Test public void setAll() { Map<String, Object> other = Maps.newHashMap(); other.put("a", "1"); other.put("b", 2); Map<String, Object> params = new TemplateParameters() .setAll(other) .get(); log(params); assertNotNull(params); assertThat(params.size(), is(2)); assertThat(params.get("a"), is((Object) "1")); assertThat(params.get("b"), is((Object) 2)); }