### Question:
HttpDateFormatter { public synchronized Date parseDateFromHttpDate(String date) { try { return httpDateFormat.parse(date); } catch (ParseException e) { LOG.debug("ParseException on date {}. 1/1/1970 will be returned", date); return new Date(0); } } HttpDateFormatter(); synchronized String formatHttpDate(Date date); synchronized Date parseDateFromHttpDate(String date);  }### Answer:
@Test public void testParseBadDate() { HttpDateFormatter httpDateFormatter = new HttpDateFormatter(); String dateString1 = "dddddddddd^^^3s"; Date date = httpDateFormatter.parseDateFromHttpDate(dateString1); assertEquals(new Date(0), date); }