@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 testGetGlobalAppWhiteList() throws Exception {
        String whitelistApp = "myapp";
        ConfigurationManager.getConfigInstance().setProperty("eureka.remoteRegion.global.appWhiteList", whitelistApp);
        DefaultEurekaServerConfig config = new DefaultEurekaServerConfig();
        Set<String> globalList = config.getRemoteRegionAppWhitelist(null);
        Assert.assertNotNull("Global whitelist is null.", globalList);
        Assert.assertEquals("Global whitelist not as expected.", 1, globalList.size());
        Assert.assertEquals("Global whitelist not as expected.", whitelistApp, globalList.iterator().next());
    }