public static RedisSinkConfig load(String yamlFile) throws IOException {
        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        return mapper.readValue(new File(yamlFile), RedisSinkConfig.class);
    }
@Test
    public final void loadFromYamlFileTest() throws IOException {
        File yamlFile = getFile("sinkConfig.yaml");
        String path = yamlFile.getAbsolutePath();
        RedisSinkConfig config = RedisSinkConfig.load(path);
        assertNotNull(config);
        assertEquals(config.getRedisHosts(), "localhost:6379");
        assertEquals(config.getRedisPassword(), "fake@123");
        assertEquals(config.getRedisDatabase(), Integer.parseInt("1"));
        assertEquals(config.getClientMode(), "Standalone");
        assertEquals(config.getOperationTimeout(), Long.parseLong("2000"));
        assertEquals(config.getBatchSize(), Integer.parseInt("100"));
        assertEquals(config.getBatchTimeMs(), Long.parseLong("1000"));
        assertEquals(config.getConnectTimeout(), Long.parseLong("3000"));
    }