### Question:
Transaction { public String toString() { return String.format( "Transaction: %d, %s at %tc by %s -'%s'", this.getId(), this.getTranType(), this.getWhen(), this.getAuthor(), this.getComment() ); } Transaction( Long id, Date when, String tranType, String user ); long getId(); String getTranType(); String getComment(); void setComment( String comment ); long getTranId(); Collection<Version> getVersions(); Date getWhen(); String getType(); String getAuthor(); void addVersion( Long id, String name, String virtualSpec, String realSpec, String ancestor ); String toString();  }### Answer:
@Test public void testToString() throws Exception { Transaction t = new Transaction( 10L, new Date(), "promote", "me" ); t.toString(); }