@Test
public void testCopyClientModification()
{
EntryAttribute attribute = new DefaultClientAttribute( atC.getName() );
attribute.add( "test1", "test2" );
Modification clientModification = new ClientModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
Modification copy = new ServerModification( schemaManager, clientModification );
assertTrue( copy instanceof ServerModification );
assertFalse( copy instanceof ClientModification );
assertFalse( copy.equals( clientModification ) );
assertTrue( copy.getAttribute() instanceof EntryAttribute );
assertEquals( atC, 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() );
EntryAttribute attribute2 = new DefaultClientAttribute( "cn", "t" );
clientModification.setAttribute( attribute2 );
assertNotSame( attribute2, copy.getAttribute() );
}