### Question:
DateUtil { public static Date parseDateTime(String timeStr, Date defaultValue){ if(timeStr == null){ return defaultValue; } try { return dateTimeSdf.get().parse(timeStr); } catch (ParseException e) { return defaultValue; } }  static String getYearMonth(Date date); static String formateYearMonthDay(Date date); static Date parseYearMonthDay(String timeStr, Date defaultValue); static String formateDateTime(Date date); static Date parseDateTime(String timeStr, Date defaultValue); static final int getCurrentHour(); static final int getLastHour(); static final int getNextHour(); static Date getFirstDayOfCurMonth(); static Date getFirstDayInMonth(Date date); static Date getFirstDayInMonth(int month); static boolean isCurrentMonth(Date date);  }### Answer:
@Test public void testParseDateTime() { System.out.println(new Date(515483463000L)); System.out.println(new Date(1356969600000L)); assertEquals(new Date(1325390268000L), DateUtil.parseDateTime("2012-01-01 11:57:48", null)); }