@Test public void testFromStringWithInvalidFormat() { Date actualDate = DateUtil.dateFromString("not:a:date"); Assert.assertEquals(null, actualDate); }
public static Date dateFromString(String date) { try { return formatter.parse(date); } catch (ParseException e) { return null; } }
DateUtil { public static Date dateFromString(String date) { try { return formatter.parse(date); } catch (ParseException e) { return null; } } }
DateUtil { public static Date dateFromString(String date) { try { return formatter.parse(date); } catch (ParseException e) { return null; } } private  DateUtil(); }
DateUtil { public static Date dateFromString(String date) { try { return formatter.parse(date); } catch (ParseException e) { return null; } } private  DateUtil(); static String toString(Date date); static String toISO8601String(Date date); static Date dateFromString(String date); static Date nowDate(); }
DateUtil { public static Date dateFromString(String date) { try { return formatter.parse(date); } catch (ParseException e) { return null; } } private  DateUtil(); static String toString(Date date); static String toISO8601String(Date date); static Date dateFromString(String date); static Date nowDate();  }