MonitorBuilder extends AbstractBuilder<MonitorConfig, MonitorBuilder> { public MonitorBuilder appendParameters(Map<String, String> appendParameters) { this.parameters = appendParameters(parameters, appendParameters); return getThis(); }  MonitorBuilder protocol(String protocol); MonitorBuilder address(String address); MonitorBuilder username(String username); MonitorBuilder password(String password); MonitorBuilder group(String group); MonitorBuilder version(String version); MonitorBuilder interval(String interval); MonitorBuilder isDefault(Boolean isDefault); MonitorBuilder appendParameter(String key, String value); MonitorBuilder appendParameters(Map<String, String> appendParameters); MonitorConfig build();  }
@Test void appendParameters() { Map<String, String> source = new HashMap<>(); source.put("default.num", "one"); source.put("num", "ONE"); MonitorBuilder builder = new MonitorBuilder(); builder.appendParameters(source); Map<String, String> parameters = builder.build().getParameters(); Assertions.assertTrue(parameters.containsKey("default.num")); Assertions.assertEquals("ONE", parameters.get("num")); }