@Test
	public void testConstructor() {
		Date epoch = new Date(0);
		Calendar currentCalendar = Calendar.getInstance();
		Date current = currentCalendar.getTime();
		currentCalendar.add(Calendar.HOUR, -1);
		Date past = currentCalendar.getTime();
		currentCalendar.add(Calendar.HOUR, 2);
		Date future = currentCalendar.getTime();
		DateTrigger dateTrigger = new DateTrigger(current, epoch, future, past);

		Date nextExecutionTime = dateTrigger.nextExecutionTime(null);
		assertNotNull("Should return epoch", nextExecutionTime);
		assertTrue("Should be epoch", epoch.compareTo(nextExecutionTime) == 0);

		nextExecutionTime = dateTrigger.nextExecutionTime(null);
		assertNotNull("Should return past", nextExecutionTime);
		assertTrue("Should be past", past.compareTo(nextExecutionTime) == 0);

		nextExecutionTime = dateTrigger.nextExecutionTime(null);
		assertNotNull("Should return current", nextExecutionTime);
		assertTrue("Should be current", current.compareTo(nextExecutionTime) == 0);

		nextExecutionTime = dateTrigger.nextExecutionTime(null);
		assertNotNull("Should return future", nextExecutionTime);
		assertTrue("Should be future", future.compareTo(nextExecutionTime) == 0);

		nextExecutionTime = dateTrigger.nextExecutionTime(null);
		assertNull("All entries should have been pulled, the nextExecutionTime should have been null.",
				nextExecutionTime);
	}
Tests for {@link DateTrigger}.

@author Glenn Renfro
spring-xd-module/src/test/java/org/springframework/xd/module/support/DateTriggerTest.java