}
}
@Test
public void doingAnOrWithANeverValidTimeLineProducesTheSameTimeLine() {
AvailabilityTimeLine timeLine = AvailabilityTimeLine.allValid();
timeLine.invalidAt(earlyExample, contemporaryExample);
timeLine.invalidAt(lateExample, lateExample.plusDays(20));
AvailabilityTimeLine another = AvailabilityTimeLine.allValid();
another.allInvalid();
AvailabilityTimeLine result = timeLine.and(another);
assertThat(result.getValidPeriods(), definedBy(StartOfTime.create(),
point(earlyExample), point(contemporaryExample),
point(lateExample), point(lateExample.plusDays(20)), EndOfTime
.create()));
}