public static SolrSinkConfig load(String yamlFile) throws IOException {
        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        return mapper.readValue(new File(yamlFile), SolrSinkConfig.class);
    }
@Test
    public final void loadFromYamlFileTest() throws IOException {
        File yamlFile = getFile("sinkConfig.yaml");
        String path = yamlFile.getAbsolutePath();
        SolrSinkConfig config = SolrSinkConfig.load(path);
        assertNotNull(config);
        assertEquals(config.getSolrUrl(), "localhost:2181,localhost:2182/chroot");
        assertEquals(config.getSolrMode(), "SolrCloud");
        assertEquals(config.getSolrCollection(), "techproducts");
        assertEquals(config.getSolrCommitWithinMs(), Integer.parseInt("100"));
        assertEquals(config.getUsername(), "fakeuser");
        assertEquals(config.getPassword(), "fake@123");
    }