@Override
    public String getString(String path) {
        try {
            Object value = configMap.get(path);
            return value == null ? null : String.valueOf(value);
        } catch (Exception e) {
            LOGGER.warn("get config data error" + path, e);
            return null;
        }
    }
@Test
    void getString() throws IOException {
        Assertions.assertThrows(IllegalArgumentException.class, () -> {
            YamlFileConfig config = new YamlFileConfig(new File("registry-test-yaml.yml"), "");
            config.getString("registry.type");
        });

        YamlFileConfig config = new YamlFileConfig(new File("src/test/resources/registry-test-yaml.yml"), "");
        Assertions.assertEquals("file", config.getString("registry.type"));
        Assertions.assertEquals("file.conf", config.getString("registry.file.name"));

        // not exist
        Assertions.assertNull(config.getString("registry.null.name"));
        Assertions.assertNull(config.getString("null"));
        // inner exception
        Assertions.assertNull(config.getString(null));
    }