@Override
    public ProtocolConfig build() {
        ProtocolConfig protocolConfig = new ProtocolConfig();
        super.build(protocolConfig);

        protocolConfig.setAccepts(accepts);
        protocolConfig.setAccesslog(accesslog);
        protocolConfig.setBuffer(buffer);
        protocolConfig.setCharset(charset);
        protocolConfig.setClient(client);
        protocolConfig.setCodec(codec);
        protocolConfig.setContextpath(contextpath);
        protocolConfig.setCorethreads(corethreads);
        protocolConfig.setDefault(isDefault);
        protocolConfig.setDispatcher(dispatcher);
        protocolConfig.setExchanger(exchanger);
        protocolConfig.setExtension(extension);
        protocolConfig.setHeartbeat(heartbeat);
        protocolConfig.setHost(host);
        protocolConfig.setIothreads(iothreads);
        protocolConfig.setKeepAlive(keepAlive);
        protocolConfig.setName(name);
        protocolConfig.setNetworker(networker);
        protocolConfig.setOptimizer(optimizer);
        protocolConfig.setParameters(parameters);
        protocolConfig.setPayload(payload);
        protocolConfig.setPort(port);
        protocolConfig.setPrompt(prompt);
        protocolConfig.setQueues(queues);
        protocolConfig.setRegister(register);
        protocolConfig.setSerialization(serialization);
        protocolConfig.setServer(server);
        protocolConfig.setStatus(status);
        protocolConfig.setTelnet(telnet);
        protocolConfig.setThreadpool(threadpool);
        protocolConfig.setThreads(threads);
        protocolConfig.setTransporter(transporter);
        protocolConfig.setSslEnabled(sslEnabled);
        protocolConfig.setExtProtocol(extProtocol);

        return protocolConfig;
    }
@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");

        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.assertNotSame(config, config2);
    }