### Question:
CalendarUtil { public static Calendar getCalendar(String yyyy, String mm, String dd) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, Integer.valueOf(yyyy)); cal.set(Calendar.MONTH, Integer.valueOf(mm) - 1); cal.set(Calendar.DATE, Integer.valueOf(dd)); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); return cal; }  static Calendar getCurrentTime(); static Calendar getCurrentTruncDate(); static Integer getYear(Calendar calendar); static Integer getMonth(Calendar calendar); static Integer getDay(Calendar calendar); static Integer getDayOfWeekNumber(Calendar cal); static Integer get24Hour(Calendar calendar); static Integer getMinute(Calendar calendar); static Integer getSecond(Calendar calendar); static Integer getMillisecond(Calendar calendar); static Calendar getCalendar(String yyyy, String mm, String dd); static Calendar getCalendar(int yyyy, int mm, int dd); static Calendar getCalendar(String yyyy, String mm, String dd, String hh, String mi, String ss); static Calendar getCalendar(int yyyy, int mm, int dd, int hh, int mi, int ss); static Calendar dateTrunc(Calendar calendar); static boolean isFirstAfterSecond(Calendar first, Calendar second); static Calendar deepCopy(Calendar src); static Calendar addYears(Calendar src, int years); static Calendar addMonths(Calendar src, int months); static Calendar addDays(Calendar src, int days); static Calendar addHours(Calendar src, int hours); static Calendar addMinutes(Calendar src, int minutes); static Calendar addSeconds(Calendar src, int seconds); static Calendar getCalendar(long timeInMillis); static String toYYYYMMDDHHMISS(Calendar calendar); static Calendar testData; }### Answer:
@Test public void getCalendar_A$String$String$String() throws Exception { long expected = 1262185200000L; String arg0 = "2009"; String arg1 = "12"; String arg2 = "31"; Calendar actual = CalendarUtil.getCalendar(arg0, arg1, arg2); assertEquals(expected, actual.getTimeInMillis()); }
@Test public void getCalendar_A$String$String$String$String$String$String() throws Exception { long expected = 1262271599000L; String arg0 = "2009"; String arg1 = "12"; String arg2 = "31"; String arg3 = "23"; String arg4 = "59"; String arg5 = "59"; Calendar actual = CalendarUtil.getCalendar(arg0, arg1, arg2, arg3, arg4, arg5); assertEquals(expected, actual.getTimeInMillis()); }
@Test public void getCalendar_A$int$int$int() throws Exception { Calendar actual = CalendarUtil.getCalendar(2000, 2, 3); assertTrue(2000 == actual.get(Calendar.YEAR)); assertTrue(1 == actual.get(Calendar.MONTH)); assertTrue(3 == actual.get(Calendar.DATE)); }
@Test public void getCalendar_A$int$int$int$int$int$int() throws Exception { Calendar actual = CalendarUtil.getCalendar(2000, 2, 3, 4, 5, 6); assertTrue(2000 == actual.get(Calendar.YEAR)); assertTrue(1 == actual.get(Calendar.MONTH)); assertTrue(3 == actual.get(Calendar.DATE)); assertTrue(4 == actual.get(Calendar.HOUR)); assertTrue(5 == actual.get(Calendar.MINUTE)); assertTrue(6 == actual.get(Calendar.SECOND)); }
@Test public void getCalendar_A$long() throws Exception { long arg0 = 12345L; Calendar actual = CalendarUtil.getCalendar(arg0); assertEquals(arg0, actual.getTimeInMillis()); }