@Test
public void testBasicDateFormat() throws Exception {

    Calendar calendar = Calendar.getInstance();
    calendar.setTimeZone(DateUtils.GMT);
    calendar.set(2005, Calendar.OCTOBER, 14, 0, 0, 0);
    calendar.set(Calendar.MILLISECOND, 0);
    Date date = calendar.getTime();
    Assert.assertEquals("Fri, 14 Oct 2005 00:00:00 GMT", DateUtils.formatDate(date));
    Assert.assertEquals("Fri, 14 Oct 2005 00:00:00 GMT", DateUtils.formatDate(date, DateUtils.PATTERN_RFC1123));
}