### Question:
RFC1123 { public static Date parseTimestamp( String input ) throws ParseException { return instance().parse( input ); } private  RFC1123(); Date parse( String input ); String format( Date date ); static Date parseTimestamp( String input ); static String formatDate( Date date ); static final TimeZone GMT; }### Answer:
@Test public void shouldParseRFC1123() throws Exception { String input = "Mon, 15 Aug 2005 15:52:01 +0000"; Date result = RFC1123.parseTimestamp( input ); calendar.setTime( result ); assertEquals( Calendar.MONDAY, calendar.get( Calendar.DAY_OF_WEEK ) ); assertEquals( 15, calendar.get( Calendar.DAY_OF_MONTH ) ); assertEquals( Calendar.AUGUST, calendar.get( Calendar.MONTH ) ); assertEquals( 2005, calendar.get( Calendar.YEAR ) ); assertEquals( 15, calendar.get( Calendar.HOUR_OF_DAY ) ); assertEquals( 52, calendar.get( Calendar.MINUTE ) ); assertEquals( 1, calendar.get( Calendar.SECOND ) ); }