DueDateView extends RelativeLayout { public void setInitDate(Date date) { this.mDate = date; setDayTitle(DateUtils.getDayFromDate(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 testSetInitDate() throws Exception { mDueDateView.setInitDate(DateUtils.fakeDate()); assertTextViewContent(mDayTitle, "14"); }