@Test
public void testCopyClientModification()
{
ClientAttribute attribute = new DefaultClientAttribute( atC.getName() );
attribute.add( "test1", "test2" );
Modification clientModification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
Modification copy = new ServerModification( registries, clientModification );
assertTrue( copy instanceof ServerModification );
assertFalse( copy instanceof ClientModification );
assertFalse( copy.equals( clientModification ) );
assertTrue( copy.getAttribute() instanceof ServerAttribute );
assertEquals( atC, ((ServerAttribute)copy.getAttribute()).getAttributeType() );
assertEquals( ModificationOperation.ADD_ATTRIBUTE, copy.getOperation() );
assertTrue( copy.getAttribute().contains( "test1", "test2" ) );
clientModification.setOperation( ModificationOperation.REMOVE_ATTRIBUTE );
assertEquals( ModificationOperation.ADD_ATTRIBUTE, copy.getOperation() );
ClientAttribute attribute2 = new DefaultClientAttribute( "cn", "t" );
clientModification.setAttribute( attribute2 );
assertNotSame( attribute2, copy.getAttribute() );
}