### Question:
DCDate { public String displayDate(boolean showTime, boolean isLocalTime, Locale locale) { if (isLocalTime) { return displayLocalDate(showTime, locale); } else { return displayUTCDate(showTime, locale); } } DCDate(Date date);  DCDate(int yyyy, int mm, int dd, int hh, int mn, int ss);  DCDate(String fromDC); int getYear(); int getMonth(); int getDay(); int getHour(); int getMinute(); int getSecond(); int getYearUTC(); int getMonthUTC(); int getDayUTC(); int getHourUTC(); int getMinuteUTC(); int getSecondUTC(); String toString(); Date toDate(); String displayDate(boolean showTime, boolean isLocalTime, Locale locale); String displayLocalDate(boolean showTime, Locale locale); String displayUTCDate(boolean showTime, Locale locale); static DCDate getCurrent(); static String getMonthName(int m, Locale locale);  }### Answer:
@Test public void testDisplayDate() { dc = new DCDate("2010"); assertThat("testDisplayDate 1 ", dc.displayDate(true, true, new Locale("en_GB")), equalTo("2010")); dc = new DCDate("2010-04"); assertThat("testDisplayDate 2 ", dc.displayDate(true, true, new Locale("en_GB")), equalTo("Apr-2010")); dc = new DCDate("2010-04-14"); assertThat("testDisplayDate 3 ", dc.displayDate(true, true, new Locale("en_GB")), equalTo("14-Apr-2010")); dc = new DCDate("2010-04-14T00:00:01Z"); assertThat("testDisplayDate 4 ", dc.displayDate(true, true, new Locale("en_GB")), equalTo("13-Apr-2010 16:00:01")); dc = new DCDate("2010-04-14T00:00:01Z"); assertThat("testDisplayDate 5 ", dc.displayDate(false, true, new Locale("en_GB")), equalTo("13-Apr-2010")); dc = new DCDate("2010-04-14T00:00:01Z"); assertThat("testDisplayDate 6 ", dc.displayDate(true, false, new Locale("es")), equalTo("14-abr-2010 00:00:01")); dc = new DCDate("2010-04-14T00:00:01Z"); assertThat("testDisplayDate 7 ", dc.displayDate(false, false, new Locale("en_GB")), equalTo("14-Apr-2010")); }