### Question:
DateUtil { public static String formatRfc1123Date(Date date) { return formatRfc1123Date(date.getTime()); } private  DateUtil(); static Date parseRfc1123Date(String dateStr); static Date parseIso8601DateTime(String dateStr); static String formatIso8601Date(Date date); static String formatIso8601Date(long time); static String formatRfc1123Date(Date date); static String formatRfc1123Date(long timeStamp);  }### Answer:
@Test public void format() { for (int i = 0, j = timeStamps.length; i < j; ++i) { assertEquals(rfc1123text[i], DateUtil.formatRfc1123Date(timeStamps[i].getTime())); } }
@Test public void formatRfc1123Date() { for (int i = 0, j = timeStamps.length; i < j; ++i) { assertEquals(rfc1123text[i], DateUtil.formatRfc1123Date(timeStamps[i])); } }
@Test public void formatInWrongLocale() { Locale orig = Locale.getDefault(); try { Locale.setDefault(Locale.ITALY); formatRfc1123Date(); } finally { Locale.setDefault(orig); } }