### Question:
DateUtils { public static Date parseStringToDate(String date) { return parseStringToDate(date, defaultDayFormat); }  static int getWeekByDate(Date date); static String getCNDefaultDate(); static String getCNWeek(int week); static String getFormatedDate(Date date); static String getFormatedDate(Date now, String format); static String getSimpleFormatDate(Date date); static String getSimpleFormatedDateNow(); static String getStandTime(); static Date parseStringToDate(String date); static Date parseStringToDate(String date, String format);  }### Answer:
@Test public void testParseStringToDate() { String strDate = "2011-5-6"; Date date = DateUtils.parseStringToDate(strDate); Assert.assertNotNull(strDate + "字符串日期转换为Date失败！", date); }
@Test public void testParseStringToDateFormat() { String strDate1 = "2011年05月08日"; String strDate2 = "2011-05-08"; String format = "yyyy年MM月dd日"; Date date1 = DateUtils.parseStringToDate(strDate1, format); Assert.assertNotNull(strDate1 + "字符串日期转换为Date失败！", date1); Date date2 = DateUtils.parseStringToDate(strDate2); Assert.assertEquals("字符串日期转换为Date失败！" + 10, date2.getTime(), date1.getTime()); }