@Test public void getDurationDate() { Date durationDate = DateUtil.getDurationDate(10); long now = new Date().getTime(); assertTrue(durationDate.getTime() > now); assertTrue(durationDate.getTime() - now > 5 * 1000); assertTrue(durationDate.getTime() - now <= 10 * 1000); }
public static Date getDurationDate(long duration) { long expireTime = System.currentTimeMillis() + duration * 1000; return new Date(expireTime); }
DateUtil { public static Date getDurationDate(long duration) { long expireTime = System.currentTimeMillis() + duration * 1000; return new Date(expireTime); } }
DateUtil { public static Date getDurationDate(long duration) { long expireTime = System.currentTimeMillis() + duration * 1000; return new Date(expireTime); }  }
DateUtil { public static Date getDurationDate(long duration) { long expireTime = System.currentTimeMillis() + duration * 1000; return new Date(expireTime); }  static Date getDurationDate(long duration); }
DateUtil { public static Date getDurationDate(long duration) { long expireTime = System.currentTimeMillis() + duration * 1000; return new Date(expireTime); }  static Date getDurationDate(long duration);  }