@Test
public void testNonSecureRunAsSubmitter() throws Exception {

  Assume.assumeTrue(shouldRun());
  Assume.assumeFalse(UserGroupInformation.isSecurityEnabled());
  String expectedRunAsUser = appSubmitter;
  conf.set(YarnConfiguration.NM_NONSECURE_MODE_LIMIT_USERS, "false");
  exec.setConf(conf);
  File touchFile = new File(workSpace, "touch-file");
  int ret = runAndBlock("touch", touchFile.getAbsolutePath());
  assertEquals(0, ret);
  FileStatus fileStatus =
      FileContext.getLocalFSFileContext().getFileStatus(
        new Path(touchFile.getAbsolutePath()));
  assertEquals(expectedRunAsUser, fileStatus.getOwner());
  cleanupAppFiles(expectedRunAsUser);
  // reset conf
  conf.unset(YarnConfiguration.NM_NONSECURE_MODE_LIMIT_USERS);
  exec.setConf(conf);
}