@Override
    public void afterPropertiesSet() throws Exception {
        if (0 == vgroupMapping.size()) {
            vgroupMapping.put(DEFAULT_TX_GROUP, DEFAULT_TC_CLUSTER);
            //compatible with old value, will remove next version
            vgroupMapping.put(DEFAULT_TX_GROUP_OLD, DEFAULT_TC_CLUSTER);
        }
        if (0 == grouplist.size()) {
            grouplist.put(DEFAULT_TC_CLUSTER, DEFAULT_GROUPLIST);
        }
    }
@Test
    public void testAfterPropertiesSet() throws Exception {
        ServiceProperties serviceProperties = new ServiceProperties();
        serviceProperties.afterPropertiesSet();
        Assertions.assertEquals("default", serviceProperties.getVgroupMapping().get("default_tx_group"));
        Assertions.assertEquals("default", serviceProperties.getVgroupMapping().get("my_test_tx_group"));
        Assertions.assertEquals("127.0.0.1:8091", serviceProperties.getGrouplist().get("default"));

        serviceProperties = new ServiceProperties();

        Map<String, String> vGroupMapping = new HashMap<>();
        vGroupMapping.put("default_tx_group", "default");
        serviceProperties.setVgroupMapping(vGroupMapping);

        Map<String, String> groupList = new HashMap<>();
        groupList.put("default", "127.0.0.1:8091");
        serviceProperties.setGrouplist(groupList);

        serviceProperties.afterPropertiesSet();
        Assertions.assertEquals("default", serviceProperties.getVgroupMapping().get("default_tx_group"));
        Assertions.assertEquals("127.0.0.1:8091", serviceProperties.getGrouplist().get("default"));
    }