VersionSummary implements Serializable { public VersionSummary( final Serializable id, final Serializable versionedFileId, final boolean aclOnlyChange, final Date date, final String author, final String message, final List<String> labels ) { super(); notNull( id ); notNull( versionedFileId ); notNull( date ); hasText( author ); notNull( labels ); this.id = id; this.versionedFileId = versionedFileId; this.date = new Date( date.getTime() ); this.author = author; this.message = message; this.labels = Collections.unmodifiableList( labels ); this.aclOnlyChange = aclOnlyChange; } VersionSummary( final Serializable id, final Serializable versionedFileId, final boolean aclOnlyChange,
      final Date date, final String author, final String message, final List<String> labels ); String getMessage(); Date getDate(); String getAuthor(); Serializable getId(); Serializable getVersionedFileId(); List<String> getLabels(); @Override int hashCode(); @Override boolean equals( Object obj ); boolean isAclOnlyChange(); @SuppressWarnings( "nls" ) @Override String toString();  }
@Test public void testVersionSummary() { try { VersionSummary failure = new VersionSummary( null, FILE_ID, ACL_CHANGE, DATE, AUTHOR, MESSAGE, LABELS ); fail( "Should of thrown an IllegalArgumentException" ); } catch ( Exception e ) { } try { VersionSummary failure = new VersionSummary( ID, FILE_ID, ACL_CHANGE, DATE, "", MESSAGE, LABELS ); fail( "Should of thrown an IllegalArgumentException" ); } catch ( Exception e ) { } try { VersionSummary failure = new VersionSummary( ID, FILE_ID, ACL_CHANGE, DATE, null, MESSAGE, LABELS ); fail( "Should of thrown an IllegalArgumentException" ); } catch ( Exception e ) { } try { VersionSummary failure = new VersionSummary( ID, FILE_ID, ACL_CHANGE, DATE, " ", MESSAGE, LABELS ); fail( "Should of thrown an IllegalArgumentException" ); } catch ( Exception e ) { } assertEquals( MESSAGE, versionSummary.getMessage() ); assertEquals( DATE, versionSummary.getDate() ); assertEquals( AUTHOR, versionSummary.getAuthor() ); assertEquals( ID, versionSummary.getId() ); assertEquals( FILE_ID, versionSummary.getVersionedFileId() ); assertEquals( DATE, versionSummary.getDate() ); assertEquals( ACL_CHANGE, versionSummary.isAclOnlyChange() ); assertEquals( LABELS, versionSummary.getLabels() ); assertNotNull( versionSummary.toString() ); assertNotEquals( 31, versionSummary.hashCode() ); }