CalendarManager { void toggleToWeek(int weekInMonth) { LocalDate date = mUnit.getFrom().plusDays(weekInMonth * 7); toggleFromMonth(date); } CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
                           @Nullable LocalDate maxDate);  CalendarManager(@NonNull LocalDate selected, @NonNull State state, @Nullable LocalDate minDate,
            @Nullable LocalDate maxDate, @Nullable Formatter formatter); boolean selectDay(@NonNull LocalDate date); @NonNull LocalDate getSelectedDay(); @NonNull String getHeaderText(); boolean hasNext(); boolean hasPrev(); boolean next(); boolean prev(); void toggleView(); @NonNull State getState(); CalendarUnit getUnits(); LocalDate getActiveMonth(); int getWeekOfMonth(); void init(@NonNull LocalDate date, @Nullable LocalDate minDate, @Nullable LocalDate maxDate); @Nullable LocalDate getMinDate(); void setMinDate(@Nullable LocalDate minDate); @Nullable LocalDate getMaxDate(); void setMaxDate(@Nullable LocalDate maxDate); @NonNull Formatter getFormatter();  }
@Test public void testToggleToWeek() throws Exception { LocalDate from = mCalendarManager.getUnits().getFrom(); mCalendarManager.toggleToWeek(2); Week week = new Week(from.plusDays(2 * 7), LocalDate.now(), mCalendarManager.getMinDate(), mCalendarManager.getMaxDate()); week.select(mCalendarManager.getSelectedDay()); assertEquals(week, mCalendarManager.getUnits()); }