### Question:
DateUtils { public static ScheduleExpression getScheduleExpression( String cron ){ List<String> ls = Splitter.on(' ').trimResults().omitEmptyStrings().splitToList(cron); ScheduleExpression result = new ScheduleExpression(); result.second(ls.get(0)); result.minute(ls.get(1)); result.hour(ls.get(2)); result.dayOfMonth(ls.get(3)); result.dayOfWeek(ls.get(4)); result.month(ls.get(5)); result.year(ls.get(6)); return result; }  static Period getPeriod( String perStr ); static Date getDateAfterPeriod(String perStr, Date curDate); static Date getDateBeforePeriod(String perStr, Date curDate); static ScheduleExpression getScheduleExpression( String cron ); static ScheduleExpression getHourlyScheduleExpression( Date date ); static ScheduleExpression getDailyScheduleExpression( Date date ); static ScheduleExpression getWeeklyScheduleExpression( Date date ); static ScheduleExpression getMonthlyScheduleExpression( Date date ); static DateTimeFormatter getDateTimeFormatter(); static String dateToStr( Date date);  }### Answer:
@Test public void testScheduleExpression() { ScheduleExpression expected = new ScheduleExpression(); expected.hour("5"); expected.month("3"); ScheduleExpression result = DateUtils.getScheduleExpression("0 0 5 * * 3 *"); Assert.assertEquals(expected.getSecond(), result.getSecond()); Assert.assertEquals(expected.getMinute(), result.getMinute()); Assert.assertEquals(expected.getHour(), result.getHour()); Assert.assertEquals(expected.getDayOfMonth(), result.getDayOfMonth()); Assert.assertEquals(expected.getDayOfWeek(), result.getDayOfWeek()); Assert.assertEquals(expected.getYear(), result.getYear()); }