public static InfluxDBSinkConfig load(String yamlFile) throws IOException {
        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        return mapper.readValue(new File(yamlFile), InfluxDBSinkConfig.class);
    }
@Test
    public final void loadFromYamlFileTest() throws IOException {
        File yamlFile = getFile("sinkConfig-v1.yaml");
        String path = yamlFile.getAbsolutePath();
        InfluxDBSinkConfig config = InfluxDBSinkConfig.load(path);
        assertNotNull(config);
        assertEquals("http://localhost:8086", config.getInfluxdbUrl());
        assertEquals("test_db", config.getDatabase());
        assertEquals("ONE", config.getConsistencyLevel());
        assertEquals("NONE", config.getLogLevel());
        assertEquals("autogen", config.getRetentionPolicy());
        assertEquals(Boolean.parseBoolean("false"), config.isGzipEnable());
        assertEquals(Long.parseLong("1000"), config.getBatchTimeMs());
        assertEquals(Integer.parseInt("100"), config.getBatchSize());
    }