@Test
public void test() throws Exception {

    // String input =
    // "src/test/resources/data/base_cuboid,src/test/resources/data/6d_cuboid";
    String output = "target/test-output/merged_cuboid";
    String cubeName = "test_kylin_cube_with_slr_ready";
    String jobname = "merge_cuboid";
    File baseFolder = File.createTempFile("kylin-f24668f6-dcff-4cb6-a89b-77f1119df8fa-", "base");
    FileUtils.forceDelete(baseFolder);
    baseFolder.mkdir();
    FileUtils.copyDirectory(new File("src/test/resources/data/base_cuboid"), baseFolder);
    FileUtils.forceDeleteOnExit(baseFolder);
    File eightFoler = File.createTempFile("kylin-f24668f6-dcff-4cb6-a89b-77f1119df8fa-", "8d");
    FileUtils.forceDelete(eightFoler);
    eightFoler.mkdir();
    FileUtils.copyDirectory(new File("src/test/resources/data/base_cuboid"), eightFoler);
    FileUtils.forceDeleteOnExit(eightFoler);
    FileUtil.fullyDelete(new File(output));
    // CubeManager cubeManager =
    // CubeManager.getInstanceFromEnv(getTestConfig());
    String[] args = { "-input", baseFolder.getAbsolutePath() + "," + eightFoler.getAbsolutePath(), "-cubename", cubeName, "-segmentname", "20130331080000_20131212080000", "-output", output, "-jobname", jobname };
    assertEquals("Job failed", 0, ToolRunner.run(conf, new MergeCuboidJob(), args));
}