Week extends RangeUnit { @Override public boolean hasNext() { LocalDate maxDate = getMaxDate(); if (maxDate == null) { return true; } else { return maxDate.isAfter(mDays.get(6).getDate()); } } Week(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                @Nullable LocalDate maxDate); @Override boolean hasNext(); @Override boolean hasPrev(); @Override boolean next(); @Override boolean prev(); @Override int getType(); @Override void deselect(@NonNull LocalDate date); @Override boolean select(@NonNull LocalDate date); @NonNull List<Day> getDays(); @Override void build();  }
@Test public void testHasNextNull() throws Exception { assertTrue(mWeek.hasNext()); }
@Test public void testHasNextTrue() throws Exception { LocalDate today = LocalDate.now(); Week week = new Week(today, today, null, today.plusWeeks(1)); assertTrue(week.hasNext()); }
@Test public void testHasNextFalse() throws Exception { LocalDate today = LocalDate.now(); Week week = new Week(today, today, null, today.withDayOfWeek(DateTimeConstants.SUNDAY)); assertFalse(week.hasNext()); }