@Test (timeout = 120000)
public void testGetJobFileWithUser() {

  Configuration conf = new Configuration();
  conf.set(MRJobConfig.MR_AM_STAGING_DIR, "/my/path/to/staging");
  String jobFile = MRApps.getJobFile(conf, "dummy-user", 
      new JobID("dummy-job", 12345));
  assertNotNull("getJobFile results in null.", jobFile);
  assertEquals("jobFile with specified user is not as expected.",
      "/my/path/to/staging/dummy-user/.staging/job_dummy-job_12345/job.xml", jobFile);
}