DatePickerDialog extends AlertDialog implements DatePopup, NumberPicker.OnValueChangeListener { public final void updateDate(Calendar calendar) { updateDate(calendar.get(YEAR), calendar.get(MONTH), calendar.get(DAY_OF_MONTH)); } DatePickerDialog(Context context);  DatePickerDialog(Context context, DatePickerCallback datePickerCallback);  DatePickerDialog(Context context, Calendar calendar, DatePickerCallback datePickerCallback); final void updateDate(Calendar calendar); @Override void updateDate(int year, int month, int dayOfMonth); @Override int getYear(); @Override int getMonth(); @Override int getDayOfMonth(); @Override void setMaxDate(int year, int month, int dayOfMonth); @Override void setMinDate(int year, int month, int dayOfMonth); @Override void setCallback(DatePickerCallback callback); void setMaxDateIsToday(); void setMaxDate(Calendar maxDate); void setMinDateIsToday(); void setMinDate(Calendar minDate); @Override void show(int year, int month, int dayOfMonth); @Override void show(Calendar calendar); @Override void setPopupTitle(String title); @Override void onValueChange(NumberPicker numberPicker, int i, int i1);  }
@Test public void testUpdateDate() throws Exception { datePickerDialog.updateDate(1988, SEPTEMBER, 21); assertEquals(1988, datePickerDialog.getYear()); assertEquals(SEPTEMBER, datePickerDialog.getMonth()); assertEquals(21, datePickerDialog.getDayOfMonth()); }