*/
public class TestCalendarReferences {
@Test
public void testCalendarAdvance() {
final Calendar calendar = new Target();
final Date today = new Date(20, Month.June, 2008);
final Period thirtyYears = new Period(30, TimeUnit.Years);
// check advance should return different reference
Date nextDate = calendar.advance(today, new Period(1,TimeUnit.Days));
assertNotSame(today, nextDate);
nextDate = calendar.advance(today, 10, TimeUnit.Days);
assertNotSame(today, nextDate);
nextDate = calendar.advance(today, thirtyYears, BusinessDayConvention.Following);
assertNotSame(today, nextDate);
nextDate = calendar.advance(today, thirtyYears, BusinessDayConvention.Following, true);
assertNotSame(today, nextDate);
nextDate = calendar.advance(today, 10, TimeUnit.Days, BusinessDayConvention.Following, true);
assertNotSame(today, nextDate);
}