public static Config resolve(Config config) {
        var resolveSystemProperty = System.getenv("KORA_SYSTEM_PROPERTIES_RESOLVE_ENABLED");
        if (resolveSystemProperty == null) {
            resolveSystemProperty = System.getProperty("kora.system.properties.resolve.enabled", "true");
        }
        var ctx = new ResolveContext(config, new ArrayDeque<>(), Boolean.parseBoolean(resolveSystemProperty));
        var newRoot = resolve(ctx, config.root());
        if (newRoot == config.root()) {
            return config;
        }
        return new SimpleConfig(config.origin(), newRoot);
    }
@Test
    void testMultipleValues() {
        var config = fromMap(Map.of(
            "value", "value",
            "reference", "value: ${value}, nullableValue1: ${?value}, nullableValue2: ${?value2}, valueWithDefault: ${value:default}, valueWithDefault: ${value2:default} leftover"
        )).resolve();
        assertThat(config.get("reference"))
            .isInstanceOf(ConfigValue.StringValue.class)
            .extracting("value", InstanceOfAssertFactories.STRING)
            .isEqualTo("value: value, nullableValue1: value, nullableValue2: , valueWithDefault: value, valueWithDefault: default leftover");
    }