### Question:
DateUtils { public static String getString (long date, String format) { Date d = new Date(date); return getString(d, format); } 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 getString_dateSignature() throws ParseException { String expectedDate = "15/05/2012"; String format = "dd/MM/yyyy"; Date date = new SimpleDateFormat(format).parse(expectedDate); assertEquals(expectedDate, DateUtils.getString(date, format)); }
@Test public void getString_longSignature() { String expectedDateAsString = "16/03/2020"; long expectedDate = 1584371565000L; String format = "dd/MM/yyyy"; assertEquals(expectedDateAsString, DateUtils.getString(expectedDate, format)); }