public void subtractThreeDays() {
Calendar baseCalendar = DateTimeUtils.toCalendar("2011-04-09", new SimpleDateFormat("yyyy-MM-dd"));
SequenceFunction sequenceFunction = new SequenceFunction(new CalendarSequence(baseCalendar, new CalendarInterval(-3, Calendar.DAY_OF_MONTH)));
for (int i=0; i<3; i++) {
Calendar calendar = sequenceFunction.generateValue();
assertEquals("Calendars should be equal", baseCalendar, calendar);
baseCalendar.add(Calendar.DAY_OF_MONTH, -3);
}
}
}