### Question:
DateUtils { public static Date parserYYYYMMddHHmmss(String dateStr){ if(Objects.isNull(dateStr)){ return null; } try { return simpleDateFormatThreadLocalYYYYMMDDHHSS.get().parse(dateStr); } catch (ParseException e) { logger.error("解析[{}]时间失败", dateStr); return null; } }  static String formatYYYYMMddHHmmss(Date date); static Date parserYYYYMMddHHmmss(String dateStr); static Date createDate(int year, int month, int day); static Date createDate(int year, int month, int day, int hh, int mm, int ss ); static boolean isSameDay(final Date date1, final Date date2); static boolean isSameDay(final Calendar cal1, final Calendar cal2); static Date addYears(final Date date, final int amount); static Date addMonths(final Date date, final int amount); static Date addWeeks(final Date date, final int amount); static Date addDays(final Date date, final int amount); static Date addHours(final Date date, final int amount); static Date addMinutes(final Date date, final int amount); static Date addSeconds(final Date date, final int amount); static Date addMilliseconds(final Date date, final int amount); static Date setYears(final Date date, final int amount); static Date setMonths(final Date date, final int amount); static Date setDays(final Date date, final int amount); static Date setHours(final Date date, final int amount); static Date setMinutes(final Date date, final int amount); static Date setSeconds(final Date date, final int amount); static Date setMilliseconds(final Date date, final int amount);  }### Answer:
@Test public void testParserYYYYMMddHHmmss(){ Date testDate = Calendar.getInstance().getTime(); String dataString = DateUtils.formatYYYYMMddHHmmss(testDate); System.out.println("dataString = " + dataString); Date parserDate = DateUtils.parserYYYYMMddHHmmss(dataString); System.out.println("parserDate = " + parserDate); Assert.assertEquals(true, DateUtils.isSameDay(testDate,parserDate)); System.out.println(DateUtils.parserYYYYMMddHHmmss("")); System.out.println(DateUtils.parserYYYYMMddHHmmss("22")); }