public static Config fromYaml(ConfigOrigin origin, InputStream is) {
        var settings = LoadSettings.builder()
            .setAllowRecursiveKeys(false)
            .build();
        var load = new Load(settings);
        @SuppressWarnings("unchecked")
        var document = (Map<String, ?>) load.loadFromInputStream(is);

        var path = ConfigValuePath.root();
        if (document == null) {
            return MapConfigFactory.fromMap(origin, Map.of());
        }
        var root = toObject(origin, path, document);
        return new SimpleConfig(origin, root);
    }
@Test
    void testEmptyYaml() {
        var config = YamlConfigFactory.fromYaml(new SimpleConfigOrigin(""), new ByteArrayInputStream(new byte[0]));
        assertThat(config.root()).isEmpty();
    }