/*
 * The MIT License
 *
 * Copyright (c) 2015 Kanstantsin Shautsou
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package hudson.triggers;

import antlr.ANTLRException;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;

/**
 * @author Kanstantsin Shautsou
 */
public class TimerTriggerTest {
    @Issue("JENKINS-29790")
    @Test
    public void testNoNPE() throws ANTLRException {
        new TimerTrigger("").run();
    }
}

@@ -1195,16 +1195,108 @@
 eption;%0A
+import hudson.scheduler.CronTabList;%0Aimport hudson.scheduler.Hash;%0Aimport org.junit.Assert;%0A
 import o
@@ -1306,24 +1306,24 @@
 junit.Test;%0A
-
 import org.j
@@ -1347,16 +1347,44 @@
 Issue;%0A%0A
+import java.util.TimeZone;%0A%0A
 /**%0A * @
@@ -1537,16 +1537,16 @@
 ption %7B%0A
-
         
@@ -1578,11 +1578,801 @@
 );%0A    %7D
+%0A%0A    @Issue(%22JENKINS-43328%22)%0A    @Test%0A    public void testTimeZoneOffset() throws Exception %7B%0A        TimeZone defaultTz = TimeZone.getDefault();%0A        TimeZone.setDefault(TimeZone.getTimeZone(%22Europe/Berlin%22));%0A        try %7B%0A            String cron = %22TZ=GMT%5CnH 0 * * *%22;%0A            CronTabList ctl = CronTabList.create(cron, Hash.from(%22whatever%22));%0A            Assert.assertEquals(%22previous occurrence is in GMT%22, %22GMT%22, ctl.previous().getTimeZone().getID());%0A%0A            cron = %22TZ=America/Denver%5CnH 0 * * *%22;%0A            ctl = CronTabList.create(cron, Hash.from(%22whatever%22));%0A            Assert.assertEquals(%22next occurrence is in America/Denver%22, %22America/Denver%22, ctl.next().getTimeZone().getID());%0A        %7D finally %7B%0A            TimeZone.setDefault(defaultTz);%0A        %7D%0A    %7D
 %0A%7D%0A

Add test