    @Test
    public void testWithSystemAndEnvProperties() throws Exception {

        SubstitutionPropertiesProvider provider = new SubstitutionPropertiesProvider(new MapPropertiesProvider(config), new SystemPropertiesProvider(), new EnvPropertiesProvider());
        Assert.assertEquals(null, provider.getProperty(""));
        Assert.assertEquals("value1", provider.getProperty("key1"));
        Assert.assertEquals("value2", provider.getProperty("key3"));
        //Nested Substitution
        Assert.assertEquals("value1-value2", provider.getProperty("key6"));
        Assert.assertEquals("value1-", provider.getProperty("key7"));
        //Test infinite loop prevention
        Assert.assertEquals(null, provider.getProperty("key5"));
        Assert.assertEquals("system.value1", provider.getProperty("env1"));
        Assert.assertEquals("gravia.value2", provider.getProperty("env2"));
    }