private Properties getConfigProperties() {
        Properties properties = new Properties();
        properties.setProperty(ConfigurationKeys.IS_USE_CLOUD_NAMESPACE_PARSING, USE_PARSE_RULE);
        properties.setProperty(ConfigurationKeys.IS_USE_ENDPOINT_PARSING_RULE, USE_PARSE_RULE);
        if (System.getProperty(PRO_SERVER_ADDR_KEY) != null) {
            properties.setProperty(PRO_SERVER_ADDR_KEY, System.getProperty(PRO_SERVER_ADDR_KEY));
        } else {
            String address = fileConfig.getConfig(getNacosAddrFileKey());
            if (address != null) {
                properties.setProperty(PRO_SERVER_ADDR_KEY, address);
            }
        }

        if (System.getProperty(PRO_NAMESPACE_KEY) != null) {
            properties.setProperty(PRO_NAMESPACE_KEY, System.getProperty(PRO_NAMESPACE_KEY));
        } else {
            String namespace = fileConfig.getConfig(getNacosNameSpaceFileKey());
            if (namespace == null) {
                namespace = DEFAULT_NAMESPACE;
            }
            properties.setProperty(PRO_NAMESPACE_KEY, namespace);
        }
        if (!initNacosAuthProperties(properties)) {
            LOGGER.info("Nacos config auth properties empty.");
        }
        String contextPath = StringUtils.isNotBlank(System.getProperty(CONTEXT_PATH)) ? System.getProperty(CONTEXT_PATH) : fileConfig.getConfig(getNacosContextPathKey());
        if (StringUtils.isNotBlank(contextPath)) {
            properties.setProperty(CONTEXT_PATH, contextPath);
        }
        return properties;
    }
@Test
    public void testGetConfigProperties() throws Exception {
        Assertions.assertNotNull(configuration);
        Method method = ReflectionUtil.getMethod(NacosConfiguration.class, "getConfigProperties");
        //do not use `ConfigurationFactory.getInstance()`, it's a proxy object
        Properties properties = (Properties)method.invoke(configuration);
        Assertions.assertEquals("/bar", properties.getProperty("contextPath"));
        System.setProperty("contextPath", "/foo");
        properties = (Properties)method.invoke(configuration);
        Assertions.assertEquals("/foo", properties.getProperty("contextPath"));
        System.clearProperty("contextPath");
    }