CronExpression implements Serializable { public static boolean isValidExpression(String cronExpression) { try { new CronExpression(cronExpression); } catch (ParseException pe) { return false; } return true; } CronExpression(String cronExpression); String toString(); static boolean isValidExpression(String cronExpression); String getCronExpression(); String getExpressionSummary();  }
@Test public void testCronValidExpression() { Arrays.stream(VALID_EXPRESSIONS).forEach(expression -> assertTrue(CronExpression.isValidExpression(expression))); }
@Test public void testCronInvalidExpression() { Arrays.stream(INVALID_VALID_EXPRESSIONS).forEach(expression -> assertFalse(CronExpression.isValidExpression(expression))); }