@Test(timeout=1000)
public void testDurationToString() throws Exception {

  assertEquals("000:00:00:00.000", DFSUtil.durationToString(0));
  assertEquals("001:01:01:01.000",
      DFSUtil.durationToString(((24*60*60)+(60*60)+(60)+1)*1000));
  assertEquals("000:23:59:59.999",
      DFSUtil.durationToString(((23*60*60)+(59*60)+(59))*1000+999));
  assertEquals("-001:01:01:01.000",
      DFSUtil.durationToString(-((24*60*60)+(60*60)+(60)+1)*1000));
  assertEquals("-000:23:59:59.574",
      DFSUtil.durationToString(-(((23*60*60)+(59*60)+(59))*1000+574)));
}