Month extends RangeUnit { @Nullable @Override LocalDate getFirstDateOfCurrentMonth(@NonNull LocalDate currentMonth) { if (currentMonth != null) { int year = currentMonth.getYear(); int month = currentMonth.getMonthOfYear(); LocalDate from = getFirstEnabled(); int fromYear = from.getYear(); int fromMonth = from.getMonthOfYear(); if (year == fromYear && month == fromMonth) { return from; } } return null; } 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 testGetFirstDayOfCurrentMonthNull() throws Exception { assertNull(mMonth.getFirstDateOfCurrentMonth(null)); }
@Test public void testGetFirstDayOfCurrentMonthNotIn() throws Exception { assertNull(mMonth.getFirstDateOfCurrentMonth(LocalDate.parse("2014-09-30"))); }
@Test public void testGetFirstDayOfCurrentMonthNotInYear() throws Exception { assertNull(mMonth.getFirstDateOfCurrentMonth(LocalDate.parse("2015-10-13"))); }
@Test public void testGetFirstDateOfCurrentMonth() throws Exception { assertEquals(LocalDate.parse("2014-10-01"), mMonth.getFirstDateOfCurrentMonth(mToday)); }