### Question:
ApplicationTemplate extends AbstractApplication implements Serializable { public ApplicationTemplate version( String version ) { this.version = version; return this; } 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; }### Answer:
@Test public void testEqualsAndHashCode_3() { ApplicationTemplate app1 = new ApplicationTemplate(); ApplicationTemplate app2 = new ApplicationTemplate( "app" ).version( "whatever" ); HashSet<ApplicationTemplate> set = new HashSet<>( 2 ); set.add( app1 ); set.add( app2 ); Assert.assertEquals( 2, set.size()); }
@Test public void testEqualsAndHashCode_4() { ApplicationTemplate app1 = new ApplicationTemplate( "app" ).version( "v1" ); ApplicationTemplate app2 = new ApplicationTemplate( "app" ).version( "v3" ); HashSet<ApplicationTemplate> set = new HashSet<>( 2 ); set.add( app1 ); set.add( app2 ); Assert.assertEquals( 2, set.size()); }