@Test
public void canHaveAnExtraCondition() {
IntraDayDate start = IntraDayDate.create(today, zero());
IntraDayDate end = IntraDayDate.create(today.plusDays(10), zero());
final List<PartialDay> generated = new ArrayList<IntraDayDate.PartialDay>();
Iterable<PartialDay> days = start.daysUntil(new UntilEnd(end) {
@Override
protected boolean hasNext(boolean lessThanEnd) {
return lessThanEnd && generated.size() < 2;
}
});