CronUtils { public static String getWeeklyCronExpression( int minutes, int hours, int dayOfWeek ) { return getCronExpression( "0", String.valueOf( minutes ), String.valueOf( hours ), null, null, Weekday.values()[(dayOfWeek % 7)].name ); }  static String getDailyCronExpression( int minutes, int hours ); static String getWeeklyCronExpression( int minutes, int hours, int dayOfWeek ); static String getMonthlyCronExpression( int minutes, int hours, int dayOfMonth ); static String getCronExpression( String seconds, String minutes, String hours, String days, String months,
        String weekday );  }
@Test public void getWeeklyCronExpressionForAllWeekdays() { assertEquals( "0 0 0 * * SUN", CronUtils.getWeeklyCronExpression( 0, 0, 0 ) ); assertEquals( "0 0 0 * * MON", CronUtils.getWeeklyCronExpression( 0, 0, 1 ) ); assertEquals( "0 0 0 * * TUE", CronUtils.getWeeklyCronExpression( 0, 0, 2 ) ); assertEquals( "0 0 0 * * WED", CronUtils.getWeeklyCronExpression( 0, 0, 3 ) ); assertEquals( "0 0 0 * * THU", CronUtils.getWeeklyCronExpression( 0, 0, 4 ) ); assertEquals( "0 0 0 * * FRI", CronUtils.getWeeklyCronExpression( 0, 0, 5 ) ); assertEquals( "0 0 0 * * SAT", CronUtils.getWeeklyCronExpression( 0, 0, 6 ) ); assertEquals( "0 0 0 * * SUN", CronUtils.getWeeklyCronExpression( 0, 0, 7 ) ); }