DueDateView extends RelativeLayout { public void setPickDate(int year, int monthOfYear, int dayOfMonth) { mDate = DateUtils.create(year, monthOfYear, dayOfMonth); setDayTitle(DateUtils.getDayFromDate(mDate)); setSubtitle(DateUtils.getMonthYearFromDate(mDate)); } DueDateView(Context context, AttributeSet attrs);  DueDateView(Context context, AttributeSet attrs, int defStyleAttr); void select(boolean isSelected); Date getDate(); void setInitDate(Date date); void setPickDate(int year, int monthOfYear, int dayOfMonth); void setDayTitle(String title); void setSubtitle(String subtitle);  }
@Test public void testSetPickDate() throws Exception { mDueDateView.setPickDate(2000, 2, 2); assertTextViewContent(mDayTitle, "02"); assertTextViewContent(mSubtitle, "03/2000"); }