Month extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && isSelected() && isInView(date)) { for (Week week : mWeeks) { if (week.isSelected() && week.isIn(date)) { mSelectedIndex = -1; setSelected(false); week.deselect(date); } } } } protected  Month(@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<Week> getWeeks(); int getSelectedIndex(); @Override void build();  }
@Test public void testDeselectNull() throws Exception { mMonth.deselect(null); assertFalse(mMonth.isSelected()); }
@Test public void testDeselectNotSelected() throws Exception { mMonth.deselect(mToday); assertFalse(mMonth.isSelected()); }
@Test public void testDeselect() throws Exception { mMonth.select(mToday); mMonth.deselect(mToday); assertFalse(mMonth.isSelected()); List<Week> weeks = mMonth.getWeeks(); for (int i = 0; i < weeks.size(); i++) { Week week = weeks.get(i); assertFalse(week.isSelected()); } }