@@ -0,0 +1,1985 @@
+package com.cronutils;%0A%0Aimport com.cronutils.model.Cron;%0Aimport com.cronutils.model.definition.CronDefinitionBuilder;%0Aimport com.cronutils.model.time.ExecutionTime;%0Aimport com.cronutils.parser.CronParser;%0Aimport org.junit.jupiter.api.Test;%0A%0Aimport java.time.ZonedDateTime;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Apublic class Issue539Test %7B%0A%0A    private final CronParser parser = new CronParser(CronDefinitionBuilder.defineCron()%0A            .withMinutes().and()%0A            .withHours().and()%0A            .withDayOfMonth().supportsL().and()%0A            .withMonth().and()%0A            .withDayOfWeek().and()%0A            .instance());%0A%0A    @Test%0A    public void testDOMWithListIncludingLastOfMonth() %7B%0A        Cron cron = parser.parse(%220 0 L,15 * *%22).validate();%0A%0A        ZonedDateTime thirdOfMonth = ZonedDateTime.parse(%222022-04-03T00:00:00+00:00%22);%0A        ZonedDateTime fifteenthOfMonth = ZonedDateTime.parse(%222022-04-15T00:00:00+00:00%22);%0A        ZonedDateTime twentiethOfMonth = ZonedDateTime.parse(%222022-04-20T00:00:00+00:00%22);%0A        ZonedDateTime thirtiethOfMonth = ZonedDateTime.parse(%222022-04-30T00:00:00+00:00%22);%0A%0A%0A        assertEquals(ExecutionTime.forCron(cron).nextExecution(thirdOfMonth).get(), fifteenthOfMonth);%0A%0A        // Fails%0A        assertEquals(ExecutionTime.forCron(cron).nextExecution(twentiethOfMonth).get(), thirtiethOfMonth);%0A    %7D%0A%0A    @Test%0A    public void testDOMWithLastOfMonth() %7B%0A        Cron cron = parser.parse(%220 0 L * *%22).validate();%0A%0A        ZonedDateTime thirdOfMonth = ZonedDateTime.parse(%222022-04-03T00:00:00+00:00%22);%0A        ZonedDateTime twentiethOfMonth = ZonedDateTime.parse(%222022-04-20T00:00:00+00:00%22);%0A        ZonedDateTime thirtiethOfMonth = ZonedDateTime.parse(%222022-04-30T00:00:00+00:00%22);%0A%0A%0A        assertEquals(ExecutionTime.forCron(cron).nextExecution(thirdOfMonth).get(), thirtiethOfMonth);%0A        assertEquals(ExecutionTime.forCron(cron).nextExecution(twentiethOfMonth).get(), thirtiethOfMonth);%0A    %7D%0A%0A%7D%0A

Add failing test for issue #539