DateUtil { public static String getCurrentAsString() { return RFC_1123_FORMAT.get().format(new Date()); }  static String getCurrentAsString(); static long parseToMilliseconds(final String dateValue); static String parseToRFC1123(final long dateValue); static String getDateAsString(Date date);  }
@Test public void testGetCurrentAsString() { Date date = new Date(); String dateAsString = DateUtil.getCurrentAsString(); DateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); String testConvertedDate = dateFormat.format(date); Assert.assertEquals(testConvertedDate, dateAsString); }