@Test
void build() {

    RegistryBuilder builder = new RegistryBuilder();
    builder.address("address").username("username").password("password").port(8080).protocol("protocol")
            .transporter("transporter").server("server").client("client").cluster("cluster").group("group")
            .version("version").timeout(1000).session(2000).file("file").wait(Integer.valueOf(10)).isCheck(true)
            .isDynamic(false).register(true).subscribe(false).isDefault(true).simplified(false).extraKeys("A")
            .parameter("default.num", "one").id("id").prefix("prefix");
    RegistryConfig config = builder.build();
    RegistryConfig config2 = builder.build();
    Assertions.assertEquals(8080, config.getPort());
    Assertions.assertEquals(1000, config.getTimeout());
    Assertions.assertEquals(2000, config.getSession());
    Assertions.assertEquals(10, config.getWait());
    Assertions.assertTrue(config.isCheck());
    Assertions.assertFalse(config.isDynamic());
    Assertions.assertTrue(config.isRegister());
    Assertions.assertFalse(config.isSubscribe());
    Assertions.assertTrue(config.isDefault());
    Assertions.assertFalse(config.getSimplified());
    Assertions.assertEquals("address", config.getAddress());
    Assertions.assertEquals("username", config.getUsername());
    Assertions.assertEquals("password", config.getPassword());
    Assertions.assertEquals("protocol", config.getProtocol());
    Assertions.assertEquals("transporter", config.getTransporter());
    Assertions.assertEquals("server", config.getServer());
    Assertions.assertEquals("client", config.getClient());
    Assertions.assertEquals("cluster", config.getCluster());
    Assertions.assertEquals("group", config.getGroup());
    Assertions.assertEquals("version", config.getVersion());
    Assertions.assertEquals("file", config.getFile());
    Assertions.assertEquals("A", config.getExtraKeys());
    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);
}