/* * this method test equals method * this will check equality based on retired indicator. */ public void testEquals2() { AbstractMutableDeletableDomainObject obj1 = new AbstractMutableDeletableDomainObject(); AbstractMutableDeletableDomainObject obj2 = new AbstractMutableDeletableDomainObject(); obj1.setRetiredIndicatorAsFalse(); obj2.setRetiredIndicatorAsTrue(); assertFalse( "objects are not same because obj1 has false retired indicator while obj2 has true", obj1.equals(obj2)); }