@Test
public void testDetermineTimestamps() throws IOException {

  Job job = Job.getInstance(conf);
  job.addCacheFile(firstCacheFile.toUri());
  job.addCacheFile(secondCacheFile.toUri());
  Configuration jobConf = job.getConfiguration();
  
  Map<URI, FileStatus> statCache = new HashMap<URI, FileStatus>();
  ClientDistributedCacheManager.determineTimestamps(jobConf, statCache);
  
  FileStatus firstStatus = statCache.get(firstCacheFile.toUri());
  FileStatus secondStatus = statCache.get(secondCacheFile.toUri());
  
  Assert.assertNotNull(firstStatus);
  Assert.assertNotNull(secondStatus);
  Assert.assertEquals(2, statCache.size());
  String expected = firstStatus.getModificationTime() + ","
      + secondStatus.getModificationTime();
  Assert.assertEquals(expected, jobConf.get(MRJobConfig.CACHE_FILE_TIMESTAMPS));
}