### Question:
DCDate { public String toString() { if (calendar == null) { return "null"; } return toStringInternal(); } 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 testToString() { dc = new DCDate((String)null); assertThat("testToString 0", dc.toString(), equalTo("null")); dc = new DCDate(""); assertThat("testToString 1", dc.toString(), equalTo("null")); dc = new DCDate("2010"); assertThat("testToString 2", dc.toString(), equalTo("2010")); dc = new DCDate("2010-04"); assertThat("testToString 3", dc.toString(), equalTo("2010-04")); dc = new DCDate("2010-04-14"); assertThat("testToString 4", dc.toString(), equalTo("2010-04-14")); dc = new DCDate("2010-04-14T01"); assertThat("testToString 5", dc.toString(), equalTo("2010-04-14T01:00:00Z")); dc = new DCDate("2010-04-14T00:01"); assertThat("testToString 6", dc.toString(), equalTo("2010-04-14T00:01:00Z")); dc = new DCDate("2010-04-14T00:00:01Z"); assertThat("testToString 7", dc.toString(), equalTo("2010-04-14T00:00:01Z")); }
@Test public void testToString() { dc = new DCDate((String) null); assertThat("testToString 0", dc.toString(), equalTo("null")); dc = new DCDate(""); assertThat("testToString 1", dc.toString(), equalTo("null")); dc = new DCDate("2010"); assertThat("testToString 2", dc.toString(), equalTo("2010")); dc = new DCDate("2010-04"); assertThat("testToString 3", dc.toString(), equalTo("2010-04")); dc = new DCDate("2010-04-14"); assertThat("testToString 4", dc.toString(), equalTo("2010-04-14")); dc = new DCDate("2010-04-14T01"); assertThat("testToString 5", dc.toString(), equalTo("2010-04-14T01:00:00Z")); dc = new DCDate("2010-04-14T00:01"); assertThat("testToString 6", dc.toString(), equalTo("2010-04-14T00:01:00Z")); dc = new DCDate("2010-04-14T00:00:01Z"); assertThat("testToString 7", dc.toString(), equalTo("2010-04-14T00:00:01Z")); }