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

        if (check != null) {
            instance.setCheck(check);
        }
        if (init != null) {
            instance.setInit(init);
        }
        if (!StringUtils.isEmpty(generic)) {
            instance.setGeneric(generic);
        }
        if (injvm != null) {
            instance.setInjvm(injvm);
        }
        if (lazy != null) {
            instance.setLazy(lazy);
        }
        if (!StringUtils.isEmpty(reconnect)) {
            instance.setReconnect(reconnect);
        }
        if (sticky != null) {
            instance.setSticky(sticky);
        }
        if (!StringUtils.isEmpty(version)) {
            instance.setVersion(version);
        }
        if (!StringUtils.isEmpty(group)) {
            instance.setGroup(group);
        }
    }
@Test
    void build() {
        ReferenceBuilder builder = new ReferenceBuilder();
        builder.check(true)
                .init(false)
                .generic(true)
                .injvm(false)
                .lazy(true)
                .reconnect("reconnect")
                .sticky(false)
                .version("version")
                .group("group")
                .id("id");

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

        Assertions.assertEquals("id", config.getId());
        Assertions.assertTrue(config.isCheck());
        Assertions.assertFalse(config.isInit());
        Assertions.assertTrue(config.isGeneric());
        Assertions.assertFalse(config.isInjvm());
        Assertions.assertTrue(config.getLazy());
        Assertions.assertFalse(config.getSticky());
        Assertions.assertEquals("reconnect", config.getReconnect());
        Assertions.assertEquals("version", config.getVersion());
        Assertions.assertEquals("group", config.getGroup());

        Assertions.assertNotSame(config, config2);
    }