@Test
public void testGetConfiguredHistoryIntermediateUserDoneDirPermissions() {

  Configuration conf = new Configuration();
  Map<String, FsPermission> parameters = ImmutableMap.of(
    "775", new FsPermission(0775),
    "123", new FsPermission(0773),
    "-rwx", new FsPermission(0770) ,
    "+rwx", new FsPermission(0777)
  );
  for (Map.Entry<String, FsPermission> entry : parameters.entrySet()) {
    conf.set(JHAdminConfig.MR_HISTORY_INTERMEDIATE_USER_DONE_DIR_PERMISSIONS,
        entry.getKey());
    Assert.assertEquals(entry.getValue(),
        getConfiguredHistoryIntermediateUserDoneDirPermissions(conf));
  }
}