RepositoryFileBundle implements IRepositoryFileBundle, Serializable { public boolean equals( Object obj ) { if ( !( obj instanceof RepositoryFileBundle ) ) { return false; } RepositoryFileBundle repoObj = (RepositoryFileBundle) obj; if ( !repoObj.getPath().equals( path ) ) { return false; } if ( !repoObj.getFile().getName().equals( file.getName() ) ) { return false; } return true; } RepositoryFileBundle( final RepositoryFile file, final RepositoryFileAcl acl, final String path,
      final File tmpFile, final String charset, final String mimeType ); RepositoryFileAcl getAcl(); RepositoryFile getFile(); InputStream getInputStream(); String getPath(); void setPath( String path ); String getCharset(); String getMimeType(); boolean equals( Object obj ); int hashCode();  }
@Test public void testEquals() throws Exception { RepositoryFileBundle equalBundle = new RepositoryFileBundle( repositoryFile, acl, PATH, null, CHAR_SET, MIME_NAME ); assertEquals( repositoryFileBundle, equalBundle ); equalBundle = new RepositoryFileBundle( repositoryFile, acl, "diffPath", null, CHAR_SET, MIME_NAME ); assertNotEquals( repositoryFileBundle, equalBundle ); RepositoryFile repoFile = new RepositoryFile.Builder( "diffName" ).path( PATH ).build(); equalBundle = new RepositoryFileBundle( repoFile, acl, PATH, null, CHAR_SET, MIME_NAME ); assertNotEquals( repositoryFileBundle, equalBundle ); }