SimpleDate { @Override public String toString() { return String.format("%04d-%02d-%02d", year, month, day); } SimpleDate(int year, int month, int day); int getYear(); int getMonth(); int getDay(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testToString() { assertEquals("2013-05-10", new SimpleDate(2013, 5, 10).toString()); }