public void doingAnAndIntersectsTheAdditionalConstraints() {
boolean[][] validities = { { true, true }, { true, false },
{ false, true }, { false, false } };
for (final boolean[] pairs : validities) {
AvailabilityTimeLine a = AvailabilityTimeLine.allValid();
a.setVetoer(new IVetoer() {
@Override
public boolean isValid(LocalDate date) {
return pairs[0];
}
});
AvailabilityTimeLine b = AvailabilityTimeLine.allValid();
b.setVetoer(new IVetoer() {
@Override
public boolean isValid(LocalDate date) {
return pairs[1];
}