Week extends RangeUnit { @Override public boolean next() { if (hasNext()) { setFrom(getFrom().plusWeeks(1)); setTo(getTo().plusWeeks(1)); build(); return true; } else { return false; } } 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 testNext() throws Exception { LocalDate nextWeek = LocalDate.parse("2014-08-04"); LocalDate nextWeekEnd = LocalDate.parse("2014-08-10"); assertTrue(mWeek.next()); assertEquals(nextWeek, mWeek.getFrom()); assertEquals(nextWeekEnd, mWeek.getTo()); assertEquals(nextWeek, mWeek.getDays().get(0).getDate()); assertEquals(nextWeekEnd, mWeek.getDays().get(6).getDate()); }