@Test
void build() {

    ProtocolBuilder builder = new ProtocolBuilder();
    builder.name("name").host("host").port(8080).contextpath("contextpath").threadpool("mockthreadpool")
            .corethreads(1).threads(2).iothreads(3).queues(4).accepts(5).codec("mockcodec")
            .serialization("serialization").charset("utf-8").payload(6).buffer(1024).heartbeat(1000)
            .accesslog("accesslog").transporter("mocktransporter").exchanger("mockexchanger")
            .dispatcher("mockdispatcher").networker("networker").server("server").client("client")
            .telnet("mocktelnethandler").prompt("prompt").status("mockstatuschecker").register(true).keepAlive(false)
            .optimizer("optimizer").extension("extension").isDefault(true)
            .appendParameter("default.num", "one").id("id").prefix("prefix");
    ProtocolConfig config = builder.build();
    ProtocolConfig config2 = builder.build();
    Assertions.assertEquals(8080, config.getPort());
    Assertions.assertEquals(1, config.getCorethreads());
    Assertions.assertEquals(2, config.getThreads());
    Assertions.assertEquals(3, config.getIothreads());
    Assertions.assertEquals(4, config.getQueues());
    Assertions.assertEquals(5, config.getAccepts());
    Assertions.assertEquals(6, config.getPayload());
    Assertions.assertEquals(1024, config.getBuffer());
    Assertions.assertEquals(1000, config.getHeartbeat());
    Assertions.assertEquals("name", config.getName());
    Assertions.assertEquals("host", config.getHost());
    Assertions.assertEquals("contextpath", config.getContextpath());
    Assertions.assertEquals("mockthreadpool", config.getThreadpool());
    Assertions.assertEquals("mockcodec", config.getCodec());
    Assertions.assertEquals("serialization", config.getSerialization());
    Assertions.assertEquals("utf-8", config.getCharset());
    Assertions.assertEquals("accesslog", config.getAccesslog());
    Assertions.assertEquals("mocktransporter", config.getTransporter());
    Assertions.assertEquals("mockexchanger", config.getExchanger());
    Assertions.assertEquals("mockdispatcher", config.getDispatcher());
    Assertions.assertEquals("networker", config.getNetworker());
    Assertions.assertEquals("server", config.getServer());
    Assertions.assertEquals("client", config.getClient());
    Assertions.assertEquals("mocktelnethandler", config.getTelnet());
    Assertions.assertEquals("prompt", config.getPrompt());
    Assertions.assertEquals("mockstatuschecker", config.getStatus());
    Assertions.assertEquals("optimizer", config.getOptimizer());
    Assertions.assertEquals("extension", config.getExtension());
    Assertions.assertTrue(config.isRegister());
    Assertions.assertFalse(config.getKeepAlive());
    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);
}