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 loadFromMapTest() throws IOException {
        Map<String, Object> map = new HashMap<>();
        map.put("alluxioMasterHost", "localhost");
        map.put("alluxioMasterPort", "19998");
        map.put("alluxioDir", "pulsar");
        map.put("filePrefix", "TopicA");
        map.put("fileExtension", ".txt");
        map.put("lineSeparator", "\n");
        map.put("rotationRecords", "100");
        map.put("rotationInterval", "-1");

        AlluxioSinkConfig config = AlluxioSinkConfig.load(map);
        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());
    }