### Question:
CronUtils { public static OffsetDateTime nextExecution(OffsetDateTime now, String expression, ZoneId zone) { if (zone == null) { zone = ZoneId.systemDefault(); } return nextExecution(now.atZoneSameInstant(zone), expression); } private  CronUtils(); static OffsetDateTime nextExecution(OffsetDateTime now, String expression, ZoneId zone);  }### Answer:
@Test public void test() { OffsetDateTime now = OffsetDateTime.parse("2020-07-17T10:00:01-04:00"); String spec = "0 10 * * *"; ZoneId zoneId = ZoneId.of("America/Toronto"); OffsetDateTime next = CronUtils.nextExecution(now, spec, zoneId); assertEquals("2020-07-18T10:00:00-04:00", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(next)); spec = "* * * * *"; zoneId = ZoneId.of("UTC"); next = CronUtils.nextExecution(now, spec, zoneId); assertEquals("2020-07-17T14:01:00Z", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(next)); }