public static Config loadFromString(String source) {
        return loadFromString(source, System.getProperties());
    }
@Test
    public void testLoadFromString() {
        String xml = getSimpleXmlConfigStr(
                "instance-name", "hz-instance-name",
                "cluster-name", "${cluster.name}"
        );

        String yaml = getSimpleYamlConfigStr(
                "instance-name", "hz-instance-name",
                "cluster-name", "${cluster.name}"
        );

        String clusterName = randomName();
        Properties properties = new Properties();
        properties.setProperty("cluster.name", clusterName);

        Config cfg = Config.loadFromString(xml, properties);

        assertEquals(clusterName, cfg.getClusterName());
        assertEquals("hz-instance-name", cfg.getInstanceName());

        clusterName = randomName();
        properties.setProperty("cluster.name", clusterName);
        cfg = Config.loadFromString(yaml, properties);

        assertEquals(clusterName, cfg.getClusterName());
        assertEquals("hz-instance-name", cfg.getInstanceName());

        // test for very long config string with length > 4K
        final int longStrLength = 1 << 14;
        String instanceName = String.join("", Collections.nCopies(longStrLength, "a"));
        yaml = getSimpleYamlConfigStr("instance-name", instanceName);

        cfg = Config.loadFromString(yaml);
        assertEquals(instanceName, cfg.getInstanceName());
    }