@Test
void build() {

    MonitorBuilder builder = new MonitorBuilder();
    builder.protocol("protocol").address("address").group("group").interval("interval").isDefault(true)
            .password("password").username("username").version("version")
            .appendParameter("default.num", "one").id("id").prefix("prefix");
    MonitorConfig config = builder.build();
    MonitorConfig config2 = builder.build();
    Assertions.assertEquals("protocol", config.getProtocol());
    Assertions.assertEquals("address", config.getAddress());
    Assertions.assertEquals("group", config.getGroup());
    Assertions.assertEquals("interval", config.getInterval());
    Assertions.assertEquals("password", config.getPassword());
    Assertions.assertEquals("username", config.getUsername());
    Assertions.assertEquals("version", config.getVersion());
    Assertions.assertTrue(config.isDefault());
    Assertions.assertTrue(config.getParameters().containsKey("default.num"));
    Assertions.assertEquals("one", config.getParameters().get("default.num"));
    Assertions.assertEquals("id", config.getId());
    Assertions.assertEquals("prefix", config.getPrefix());
    Assertions.assertNotSame(config, config2);
}