calendar.setExpiringDate(WEDNESDAY_LOCAL_DATE);
}
@Test
public void testSetValidFrom() {
BaseCalendar calendar = createBasicCalendar();
LocalDate currentDate = new LocalDate();
calendar.newVersion(currentDate.plusWeeks(4));
assertThat(calendar.getValidFrom(currentDate), nullValue());
assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
equalTo(currentDate.plusWeeks(4)));
calendar.setValidFrom(currentDate.plusWeeks(2), currentDate
.plusWeeks(4));
assertThat(calendar.getValidFrom(currentDate), nullValue());
assertThat(calendar.getValidFrom(currentDate.plusWeeks(4)),
equalTo(currentDate.plusWeeks(2)));
}