### Question:
ModifyRequestImpl extends AbstractAbandonableRequest implements ModifyRequest { @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } if ( !super.equals( obj ) ) { return false; } ModifyRequest req = ( ModifyRequest ) obj; if ( name != null && req.getName() == null ) { return false; } if ( name == null && req.getName() != null ) { return false; } if ( name != null && req.getName() != null && !name.equals( req.getName() ) ) { return false; } if ( req.getModifications().size() != mods.size() ) { return false; } Iterator<Modification> list = req.getModifications().iterator(); for ( int i = 0; i < mods.size(); i++ ) { Modification item = list.next(); if ( item == null ) { if ( mods.get( i ) != null ) { return false; } } else if ( !item.equals( mods.get( i ) ) ) { return false; } } return true; } ModifyRequestImpl(); @Override Collection<Modification> getModifications(); @Override Dn getName(); @Override ModifyRequest setName( Dn name ); @Override ModifyRequest addModification( Modification mod ); @Override ModifyRequest addModification( Attribute attr, ModificationOperation modOp ); @Override ModifyRequest add( String attributeName, String... attributeValue ); ModifyRequest add( String attributeName, byte[]... attributeValue ); @Override ModifyRequest add( Attribute attr ); @Override ModifyRequest replace( String attributeName ); @Override ModifyRequest replace( String attributeName, String... attributeValue ); ModifyRequest replace( String attributeName, byte[]... attributeValue ); @Override ModifyRequest replace( Attribute attr ); @Override ModifyRequest removeModification( Modification mod ); @Override ModifyRequest remove( String attributeName, String... attributeValue ); ModifyRequest remove( String attributeName, byte[]... attributeValue ); @Override ModifyRequest remove( Attribute attr ); @Override ModifyRequest remove( String attributeName ); @Override ModifyRequest increment( String attributeName ); @Override ModifyRequest increment( String attributeName, int increment ); @Override ModifyRequest increment( Attribute attr ); @Override ModifyRequest increment( Attribute attr, int increment ); @Override ModifyRequest setMessageId( int messageId ); @Override ModifyRequest addControl( Control control ); @Override ModifyRequest addAllControls( Control[] controls ); @Override ModifyRequest removeControl( Control control ); @Override MessageTypeEnum getResponseType(); @Override ModifyResponse getResultResponse(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString();  }### Answer:
@Test public void testEqualsSameObj() throws LdapException { ModifyRequestImpl req = getRequest(); assertTrue( req.equals( req ) ); }
@Test public void testEqualsExactCopy() throws LdapException { ModifyRequestImpl req0 = getRequest(); ModifyRequestImpl req1 = getRequest(); assertTrue( req0.equals( req1 ) ); }