@Test
@Ignore("Ignore it for we need to do some reactor work for storage cleanup job")
public void test() throws Exception {

    FileSystem mockFs = mock(FileSystem.class);
    prepareUnusedIntermediateHiveTable(mockFs);
    prepareUnusedHDFSFiles(mockFs);
    MockStorageCleanupJob job = new MockStorageCleanupJob(KylinConfig.getInstanceFromEnv(), mockFs, mockFs);
    job.execute(new String[] { "--delete", "true" });
    ArgumentCaptor<Path> pathCaptor = ArgumentCaptor.forClass(Path.class);
    verify(mockFs, times(2)).delete(pathCaptor.capture(), eq(true));
    ArrayList<Path> expected = Lists.newArrayList(
            // verifyCleanUnusedIntermediateHiveTable
            new Path("file:///tmp/examples/test_metadata/kylin-f8edd777-8756-40d5-be19-3159120e4f7b/kylin_intermediate_2838c7fc-722a-48fa-9d1a-8ab37837a952"),
            // verifyCleanUnusedHdfsFiles
            new Path("file:///tmp/examples/test_metadata/kylin-to-be-delete")
    );
    assertEquals(expected, pathCaptor.getAllValues());
}