DateUtil { public static long getCurrentTime() { return System.currentTimeMillis(); }  static Date string2Date(final String ds); static Date string2Date(final String date, final String format); static String date2String(final Date date); static String date2String(final Date date, final String format); static String getCurrentTimestamp(); static long getCurrentTime(); static Date getCurrentDate(); static int daysBetween(final Date startDate); static Date getYrMonthLastDay(final Date d); static Date getYrMonthFirstDay(final Date d); static int daysBetween(final Date startDate, final Date endDate);  }
@Test public void getCurrentTime() { long s1 = DateUtil.getCurrentTime(); long s2 = System.currentTimeMillis(); Assert.isTrue(s1 - s2 < NUM_100, ErrorCodeDef.SYSTEM_ERROR_10001); }