### Question:
DateUtils { public static boolean isSameDay (long date1, long date2) { Calendar cal1 = Calendar.getInstance(); Calendar cal2 = Calendar.getInstance(); cal1.setTimeInMillis(date1); cal2.setTimeInMillis(date2); return cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && cal1.get(Calendar.DAY_OF_YEAR) == cal2.get (Calendar.DAY_OF_YEAR); } private  DateUtils(); static String getString(long date, String format); static String getString(Date d, String format); static Calendar getDateFromString(String str, String format); static Calendar getLongFromDateTime(String date, String dateFormat, String time, String timeFormat); static Calendar getCalendar(Long dateTime); static String getLocalizedDateTime(Context mContext,
      String dateString, String format); static boolean is24HourMode(Context mContext); static boolean isSameDay(long date1, long date2); static long getNextMinute(); static long getPresetReminder(Long currentReminder); static Long getPresetReminder(String alarm); static boolean isFuture(String timestamp); static boolean isFuture(Long timestamp); static String prettyTime(String timeInMillisec); static String prettyTime(Long timeInMillisec);  }### Answer:
@Test public void isSameDay () { long today = Calendar.getInstance().getTimeInMillis(); long tomorrow = today + (1000 * 60 * 60 * 24); assertTrue(DateUtils.isSameDay(today, today)); assertFalse(DateUtils.isSameDay(today, tomorrow)); }