### Question:
DateUtils { public static Date parseCompressedISO8601Date(String dateString) { return parse(COMPRESSED_DATE_PATTERN, dateString); }  static Date parse(String pattern, String dateString); static String format(String pattern, Date date); static Date parseISO8601Date(String dateString); static String formatISO8601Date(Date date); static Date parseRFC822Date(String dateString); static String formatRFC822Date(Date date); static Date parseCompressedISO8601Date(String dateString); static Date cloneDate(Date date); static long numberOfDaysSinceEpoch(long milliSinceEpoch); static final String ISO8601_DATE_PATTERN; static final String ALTERNATE_ISO8601_DATE_PATTERN; static final String RFC822_DATE_PATTERN; static final String COMPRESSED_DATE_PATTERN; }### Answer:
@Test public void testCompressedIso8601Date() throws ParseException { Date date = new Date(); String formatted = compressedIso8601DateFormat.print(date.getTime()); Date expected = new Date(compressedIso8601DateFormat.parseMillis(formatted)); Date actual = DateUtils.parseCompressedISO8601Date(formatted); assertEquals(expected, actual); }