DatetimeHelper { public static String dateToString(Date date) { SimpleDateFormat formatter = new SimpleDateFormat(ISO_DATE_FORMAT); formatter.setTimeZone(TimeZone.getTimeZone("GMT")); return formatter.format(date); }  static long getTimestamp(); static String dateToString(Date date); static Date stringToDate(String dateText); static String dateToShortReadableString(Context context, Date date); static String convertSecondsToReadableDuration(long totalMilliseconds); static String convertSecondsToDuration(long totalMilliseconds); static String formatRFC822Date(Date date);  }
@Test public void dateToStringTest() { String dateStr = DatetimeHelper.dateToString(new Date()); assertNotNull(dateStr); }