HeaderHelper { public static String formatDate(Date date) { return ((DateFormat)DateFormats.formats[0].clone()).format(date); } private  HeaderHelper(); static List<AcceptMediaType> createAcceptMediaTypeList(String header); static List<AcceptLanguage> createAcceptedLanguageList(String header); static List<AcceptToken> createAcceptedCharsetList(String header); static List<AcceptToken> createAcceptedEncodingList(String header); static List<Cookie> parseCookies(String cookiesString); static NewCookie parseNewCookie(String newCookieString); static Date parseDateHeader(String header); static String formatDate(Date date); static long getContentLengthLong(MultivaluedMap<String, String> httpHeaders); @SuppressWarnings({"unchecked"}) static String getHeaderAsString(Object o); static String convertToString(Collection<String> collection); static final Comparator<QualityValue> QUALITY_VALUE_COMPARATOR; }
@Test public void formatsDate() throws Exception { final Date date = date(2010, 1, 8, 2, 5, 0, "EET"); assertEquals("Fri, 08 Jan 2010 00:05:00 GMT", HeaderHelper.formatDate(date)); }