@Test
public void testGetJobFoldersTypicalHistoryFolder() {

  Path histFolder = new Path(Constants.TONY_CORE_SRC + "test/resources/typicalHistFolder");
  String regex = "^job.*";
  List<Path> expectedRes = new ArrayList<>();
  for (int i = 1; i < 6; ++i) {
    String sb = "file:" + System.getProperty("user.dir") + "/tony-core/src/test/resources/typicalHistFolder/job" + i;
    expectedRes.add(new Path(sb));
  }
  List<Path> actualRes = HdfsUtils.getJobDirs(fs, histFolder, regex);
  Collections.sort(actualRes);
  assertEquals(actualRes, expectedRes);
  assertEquals(actualRes.size(), expectedRes.size());
}