@Nullable
    @Override
    public Set<String> getRemoteRegionAppWhitelist(@Nullable String regionName) {
        if (null == regionName) {
            regionName = "global";
        } else {
            regionName = regionName.trim().toLowerCase();
        }
        DynamicStringProperty appWhiteListProp =
                configInstance.getStringProperty(namespace + "remoteRegion." + regionName + ".appWhiteList", null);
        if (null == appWhiteListProp || null == appWhiteListProp.get()) {
            return null;
        } else {
            String appWhiteListStr = appWhiteListProp.get();
            String[] whitelistEntries = appWhiteListStr.split(",");
            return new HashSet<String>(Arrays.asList(whitelistEntries));
        }
    }
@Test
    public void testGetRegionAppWhiteList() throws Exception {
        String globalWhiteListApp = "myapp";
        String regionWhiteListApp = "myapp";
        ConfigurationManager.getConfigInstance().setProperty("eureka.remoteRegion.global.appWhiteList", globalWhiteListApp);
        ConfigurationManager.getConfigInstance().setProperty("eureka.remoteRegion.region1.appWhiteList", regionWhiteListApp);
        DefaultEurekaServerConfig config = new DefaultEurekaServerConfig();
        Set<String> regionList = config.getRemoteRegionAppWhitelist(null);
        Assert.assertNotNull("Region whitelist is null.", regionList);
        Assert.assertEquals("Region whitelist not as expected.", 1, regionList.size());
        Assert.assertEquals("Region whitelist not as expected.", regionWhiteListApp, regionList.iterator().next());
    }