public static HbaseSinkConfig load(String yamlFile) throws IOException {
        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        return mapper.readValue(new File(yamlFile), HbaseSinkConfig.class);
    }
@Test
    public final void loadFromYamlFileTest() throws IOException {
        File yamlFile = getFile("sinkConfig.yaml");
        String path = yamlFile.getAbsolutePath();
        HbaseSinkConfig config = HbaseSinkConfig.load(path);
        assertNotNull(config);
        assertEquals("hbase-site.xml", config.getHbaseConfigResources());
        assertEquals("localhost", config.getZookeeperQuorum());
        assertEquals("2181", config.getZookeeperClientPort());
        assertEquals("/hbase", config.getZookeeperZnodeParent());
        assertEquals("pulsar_hbase", config.getTableName());
        assertEquals("rowKey", config.getRowKeyName());
        assertEquals("info", config.getFamilyName());

        List<String> qualifierNames = new ArrayList<>();
        qualifierNames.add("name");
        qualifierNames.add("address");
        qualifierNames.add("age");
        assertEquals(qualifierNames, config.getQualifierNames());
    }