ReleaseDetails { @Override public String toString() { return "ReleaseDetails [id=" + this.id + ", version=" + this.version + ", buildDate=" + this.buildDate + "]"; } private  ReleaseDetails(); private  ReleaseDetails(final String id, final String version, final Date buildDate); String getId(); String getVersion(); Date getBuildDate(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static ReleaseDetails defaultInstance(); static String rightsStatement(); static ReleaseDetails getInstance(); static Set<String> getIds(); static ReleaseDetails byId(final String id); static Collection<ReleaseDetails> getDetails(); static ReleaseDetails addDetailsFromResource(final String resourceName); static final String APPLICATION_PROPERTIES_ROOT; static final String PROPERTIES_EXT; static final String LIBRARY_DETAILS_RESOURCE; }
@Test public final void testToString() throws ParseException { ReleaseDetails instance = ReleaseDetails.byId(NAME); String dateFormat = "yyyy-MM-dd"; SimpleDateFormat formatter = new SimpleDateFormat(dateFormat); Date date = formatter.parse("2011-07-31"); assertEquals("ReleaseDetails [id=" + NAME + ", version=0.0.0-TEST, buildDate=" + date.toString() + "]", instance.toString()); }