### Question:
PentahoWebPackageResourceMapping { public boolean equals( Object obj ) { if ( this == obj ) { return true; } else if ( obj == null ) { return false; } else if ( this.getClass() != obj.getClass() ) { return false; } else { PentahoWebPackageResourceMapping other = (PentahoWebPackageResourceMapping) obj; return other.pentahoWebPackage.equals( this.pentahoWebPackage ); } } PentahoWebPackageResourceMapping( IPentahoWebPackage pentahoWebPackage ); String getAlias(); String getPath(); String toString(); boolean equals( Object obj );  }### Answer:
@Test public void testEqualsWhereObjectNull() { this.pentahoWebPackageResourceMapping = new PentahoWebPackageResourceMapping( null ); assertFalse( this.pentahoWebPackageResourceMapping.equals( null ) ); }
@Test public void testEqualsWhereObjectIsInvalidReference() { this.pentahoWebPackageResourceMapping = new PentahoWebPackageResourceMapping( null ); Object invalidRef = new Object(); assertFalse( this.pentahoWebPackageResourceMapping.equals( invalidRef ) ); }
@Test public void testEqualsWhereObjectIsSameReference() { this.pentahoWebPackageResourceMapping = new PentahoWebPackageResourceMapping( this.mockPentahoWebPackage ); Object sameRef = this.pentahoWebPackageResourceMapping; assertTrue( this.pentahoWebPackageResourceMapping.equals( sameRef ) ); }
@Test public void testEqualsWhereObjectIsValidReferenceOther() { this.pentahoWebPackageResourceMapping = new PentahoWebPackageResourceMapping( this.mockPentahoWebPackage ); Object other = new PentahoWebPackageResourceMapping( this.mockPentahoWebPackage ); assertTrue( this.pentahoWebPackageResourceMapping.equals( other ) ); }