@Override
    @SuppressWarnings("unchecked")
    public void build(T instance) {
        super.build(instance);

        if (actives != null) {
            instance.setActives(actives);
        }
        if (async != null) {
            instance.setAsync(async);
        }
        if (!StringUtils.isEmpty(cache)) {
            instance.setCache(cache);
        }
        if (forks != null) {
            instance.setForks(forks);
        }
        if (!StringUtils.isEmpty(loadbalance)) {
            instance.setLoadbalance(loadbalance);
        }
        if (!StringUtils.isEmpty(merger)) {
            instance.setMerger(merger);
        }
        if (!StringUtils.isEmpty(mock)) {
            instance.setMock(mock);
        }
        if (retries != null) {
            instance.setRetries(retries);
        }
        if (sent != null) {
            instance.setSent(sent);
        }
        if (timeout != null) {
            instance.setTimeout(timeout);
        }
        if (!StringUtils.isEmpty(validation)) {
            instance.setValidation(validation);
        }
        if (parameters != null) {
            instance.setParameters(parameters);
        }
    }
@Test
    void build() {
        MethodBuilder builder = new MethodBuilder();
        builder.id("id")
                .timeout(1)
                .retries(2)
                .actives(3)
                .loadbalance("mockloadbalance")
                .async(true)
                .sent(false)
                .mock("mock")
                .merger("merger")
                .cache("cache")
                .validation("validation")
                .appendParameter("default.num", "one");

        MethodConfig config = builder.build();
        MethodConfig config2 = builder.build();

        Assertions.assertEquals("id", config.getId());
        Assertions.assertEquals(1, config.getTimeout());
        Assertions.assertEquals(2, config.getRetries());
        Assertions.assertEquals(3, config.getActives());
        Assertions.assertEquals("mockloadbalance", config.getLoadbalance());
        Assertions.assertTrue(config.isAsync());
        Assertions.assertFalse(config.getSent());
        Assertions.assertEquals("mock", config.getMock());
        Assertions.assertEquals("merger", config.getMerger());
        Assertions.assertEquals("cache", config.getCache());
        Assertions.assertEquals("validation", config.getValidation());
        Assertions.assertTrue(config.getParameters().containsKey("default.num"));
        Assertions.assertEquals("one", config.getParameters().get("default.num"));

        Assertions.assertNotSame(config, config2);
    }