public static AlluxioSinkConfig load(String yamlFile) throws IOException {
        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        return mapper.readValue(new File(yamlFile), AlluxioSinkConfig.class);
    }
@Test
    public final void loadFromYamlFileTest() throws IOException {
        File yamlFile = getFile("sinkConfig.yaml");
        String path = yamlFile.getAbsolutePath();
        AlluxioSinkConfig config = AlluxioSinkConfig.load(path);
        assertNotNull(config);
        assertEquals("localhost", config.getAlluxioMasterHost());
        assertEquals(Integer.parseInt("19998"), config.getAlluxioMasterPort());
        assertEquals("pulsar", config.getAlluxioDir());
        assertEquals("TopicA", config.getFilePrefix());
        assertEquals(".txt", config.getFileExtension());
        assertEquals("\n".charAt(0), config.getLineSeparator());
        assertEquals(Long.parseLong("100"), config.getRotationRecords());
        assertEquals(Long.parseLong("-1"), config.getRotationInterval());
    }