ApplicationTemplate extends AbstractApplication implements Serializable { public void setVersion( String version ) { this.version = version; } ApplicationTemplate();  ApplicationTemplate( String name ); String getVersion(); void setVersion( String version ); String getDslId(); void setDslId( String dslId ); @Override Graphs getGraphs(); void setGraphs( Graphs graphs ); String getExternalExportsPrefix(); void setExternalExportsPrefix( String externalExportsPrefix ); @Override boolean equals( Object obj ); @Override int hashCode(); ApplicationTemplate name( String name ); ApplicationTemplate version( String version ); ApplicationTemplate description( String description ); ApplicationTemplate dslId( String dslId ); ApplicationTemplate graphs( Graphs graphs ); ApplicationTemplate directory( File directory ); List<Application> getAssociatedApplications(); void addTag( String tag ); void setTags( Collection<String> tags ); Set<String> getTags(); final Map<String,String> externalExports; }
@Test public void testEqualsAndHashCode_1() { ApplicationTemplate app1 = new ApplicationTemplate(); app1.setName( "app" ); app1.setVersion( "snapshot" ); ApplicationTemplate app2 = new ApplicationTemplate(); app2.setName( "app" ); app2.setVersion( "snapshot" ); HashSet<ApplicationTemplate> set = new HashSet<>( 2 ); set.add( app1 ); set.add( app2 ); Assert.assertEquals( 1, set.size()); }