@Test
public void testPutEntryAttributeArray() throws LdapException
{
Entry entry = new DefaultEntry( EXAMPLE_DN );
EntryAttribute attrOC = new DefaultEntryAttribute( "objectClass", "top", "person" );
EntryAttribute attrCN = new DefaultEntryAttribute( "cn", "test1", "test2" );
EntryAttribute attrSN = new DefaultEntryAttribute( "sn", "Test1", "Test2" );
EntryAttribute attrPWD = new DefaultEntryAttribute( "userPassword", BYTES1, BYTES2 );
List<EntryAttribute> removed = entry.put( attrOC, attrCN, attrSN, attrPWD );
assertEquals( 4, entry.size() );
assertEquals( 0, removed.size() );
assertTrue( entry.containsAttribute( "ObjectClass" ) );
assertTrue( entry.containsAttribute( "CN" ) );
assertTrue( entry.containsAttribute( " sn " ) );
assertTrue( entry.containsAttribute( "userPassword" ) );
EntryAttribute attrCN2 = new DefaultEntryAttribute( "cn", "test3", "test4" );
removed = entry.put( attrCN2 );
assertEquals( 4, entry.size() );
assertEquals( 1, removed.size() );
assertTrue( entry.containsAttribute( "CN" ) );
assertTrue( entry.contains( "cn", "test3", "test4" ) );