### Question:
ErrorDetails { @Override public boolean equals( Object obj ) { return obj != null && obj.getClass().equals( getClass()) && ((ErrorDetails) obj).errorDetailsKind == this.errorDetailsKind && Objects.equals(((ErrorDetails) obj).elementName, this.elementName ); } protected  ErrorDetails( String elementName, ErrorDetailsKind errorDetailsKind ); String getElementName(); ErrorDetailsKind getErrorDetailsKind(); @Override String toString(); @Override boolean equals( Object obj ); @Override int hashCode(); static ErrorDetails instance( String instanceName ); static ErrorDetails instance( Instance instance ); static ErrorDetails facet( String facetName ); static ErrorDetails facet( Facet facet ); static ErrorDetails component( String componentName ); static ErrorDetails component( Component component ); static ErrorDetails application( Application app ); static ErrorDetails application( String appName ); static ErrorDetails applicationTpl( ApplicationTemplate tpl ); static ErrorDetails applicationTpl( String tplName, String tplVersion ); static ErrorDetails variable( String variableName ); static ErrorDetails file( File file ); static ErrorDetails file( String filePath ); static ErrorDetails directory( File directory ); static ErrorDetails directory( String filePath ); static ErrorDetails unrecognized( String unrecognizedName ); static ErrorDetails expected( String expectedName ); static ErrorDetails unexpected( String unexpectedName ); static ErrorDetails malformed( String malformedName ); static ErrorDetails name( String name ); static ErrorDetails instruction( String instruction ); static ErrorDetails cycle( String cycle ); static ErrorDetails exception( Throwable t ); static ErrorDetails exceptionName( Throwable t ); static ErrorDetails logReference( String logReference ); static ErrorDetails alreadyDefined( String name ); static ErrorDetails conflicting( String name ); static ErrorDetails value( String value ); static ErrorDetails line( int line );  }### Answer:
@Test public void testEquals() { ErrorDetails ed1 = ErrorDetails.component( "c1" ); ErrorDetails ed2 = ErrorDetails.instance( "c1" ); ErrorDetails ed3 = ErrorDetails.component( "c2" ); Assert.assertNotEquals( ed1, ed2 ); Assert.assertNotEquals( ed3, ed2 ); Assert.assertNotEquals( ed1, ed3 ); Assert.assertEquals( ed1, ErrorDetails.component( "c1" )); Assert.assertNotEquals( ed1, null ); Assert.assertNotEquals( ed1, new Object()); }