@Test public void parsesRFC_1123() { String dateHeader = "Thu, 29 Dec 2011 12:03:50 GMT"; Date expectedDate = date(2011, 12, 29, 12, 3, 50, "GMT"); Date date = dateHeaderDelegate.fromString(dateHeader); assertTrue(String.format("Dates are not equal, %s and %s", expectedDate, date), Math.abs(expectedDate.getTime() - date.getTime()) < 1000); }
@Override public Date fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } return HeaderHelper.parseDateHeader(header); }
DateHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Date> { @Override public Date fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } return HeaderHelper.parseDateHeader(header); } }
DateHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Date> { @Override public Date fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } return HeaderHelper.parseDateHeader(header); }  }
DateHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Date> { @Override public Date fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } return HeaderHelper.parseDateHeader(header); }  @Override Date fromString(String header); @Override String toString(Date date); }
DateHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Date> { @Override public Date fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } return HeaderHelper.parseDateHeader(header); }  @Override Date fromString(String header); @Override String toString(Date date);  }