CompactCalendarController { Date getFirstDayOfCurrentMonth() { Calendar calendar = Calendar.getInstance(timeZone, locale); calendar.setTime(currentDate); calendar.add(Calendar.MONTH, monthsScrolledSoFar()); calendar.set(Calendar.DAY_OF_MONTH, 1); setToMidnight(calendar); return calendar.getTime(); } CompactCalendarController(Paint dayPaint, OverScroller scroller, Rect textSizeRect, AttributeSet attrs,
                              Context context, int currentDayBackgroundColor, int calenderTextColor,
                              int currentSelectedDayBackgroundColor, VelocityTracker velocityTracker,
                              int multiEventIndicatorColor, EventsContainer eventsContainer,
                              Locale locale, TimeZone timeZone);  static final int IDLE; static final int EXPOSE_CALENDAR_ANIMATION; static final int EXPAND_COLLAPSE_CALENDAR; static final int ANIMATE_INDICATORS; }
@Test public void testItReturnsFirstDayOfMonth(){ Calendar currentCalender = Calendar.getInstance(); currentCalender.set(Calendar.DAY_OF_MONTH, 1); currentCalender.set(Calendar.HOUR_OF_DAY, 0); currentCalender.set(Calendar.MINUTE, 0); currentCalender.set(Calendar.SECOND, 0); currentCalender.set(Calendar.MILLISECOND, 0); Date expectFirstDayOfMonth = currentCalender.getTime(); Date actualDate = underTest.getFirstDayOfCurrentMonth(); assertEquals(expectFirstDayOfMonth, actualDate); }