private UserData buildPs(final int num) {

        UserData userData = new UserData() {
            @Override
            public Map<String, List<String>> getZoneData() {

                Map<String, List<String>> map = new HashMap<String, List<String>>();
                List<String> providerInfos = new ArrayList<String>();
                for (int i = 0; i < num; i++) {
                    providerInfos.add("127.0.0.1:" + (20000 + i));
                }
                map.put("localZone", providerInfos);

                return map;
            }

            @Override
            public String getLocalZone() {
                return "localZone";
            }
        };

        return userData;
    }
Created by zhanggeng on 2017/7/15.

@author <a href="mailto:zhanggeng.zg@antfin.com">zhanggeng</a>
registry/registry-sofa/src/test/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistrySubscribeCallbackTest.java