ApplicationTemplate extends AbstractApplication implements Serializable { @Override public boolean equals( Object obj ) { return obj instanceof ApplicationTemplate && Objects.equals( this.name, ((ApplicationTemplate) obj ).getName()) && Objects.equals( this.version, ((ApplicationTemplate) obj ).getVersion()); } 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 testEquals() { ApplicationTemplate app = new ApplicationTemplate( "app" ); Assert.assertFalse( app.equals( null )); Assert.assertFalse( app.equals( new ApplicationTemplate())); Assert.assertFalse( app.equals( new ApplicationTemplate( "app" ).version( "something" ))); Assert.assertFalse( app.equals( new Object())); Assert.assertEquals( app, app ); Assert.assertEquals( app, new ApplicationTemplate( "app" )); }