@Test public void testEqualsAndHashCode_2() { Application app1 = new Application( new TestApplicationTemplate()); app1.setName( "app" ); Application app2 = new Application( app1.getTemplate()); app2.setName( "app" ); HashSet<Application> set = new HashSet<>( 2 ); set.add( app1 ); set.add( app2 ); Assert.assertEquals( 1, set.size()); }
public ApplicationTemplate getTemplate() { return this.template; }
Application extends AbstractApplication implements Serializable { public ApplicationTemplate getTemplate() { return this.template; } }
Application extends AbstractApplication implements Serializable { public ApplicationTemplate getTemplate() { return this.template; } Application( ApplicationTemplate template );  Application( String name, ApplicationTemplate template ); }
Application extends AbstractApplication implements Serializable { public ApplicationTemplate getTemplate() { return this.template; } Application( ApplicationTemplate template );  Application( String name, ApplicationTemplate template ); ApplicationTemplate getTemplate(); @Override Graphs getGraphs(); Map<String,String> getExternalExports(); @Override boolean equals( Object obj ); @Override int hashCode(); Application name( String name ); Application description( String description ); Application directory( File directory ); void removeAssociationWithTemplate(); void bindWithApplication( String externalExportPrefix, String applicationName ); boolean unbindFromApplication( String externalExportPrefix, String applicationName ); boolean replaceApplicationBindings( String externalExportPrefix, Set<String> applicationNames ); Map<String,Set<String>> getApplicationBindings(); }
Application extends AbstractApplication implements Serializable { public ApplicationTemplate getTemplate() { return this.template; } Application( ApplicationTemplate template );  Application( String name, ApplicationTemplate template ); ApplicationTemplate getTemplate(); @Override Graphs getGraphs(); Map<String,String> getExternalExports(); @Override boolean equals( Object obj ); @Override int hashCode(); Application name( String name ); Application description( String description ); Application directory( File directory ); void removeAssociationWithTemplate(); void bindWithApplication( String externalExportPrefix, String applicationName ); boolean unbindFromApplication( String externalExportPrefix, String applicationName ); boolean replaceApplicationBindings( String externalExportPrefix, Set<String> applicationNames ); Map<String,Set<String>> getApplicationBindings();  }