Refactor CronVaidator. Add tests for CronValidator.