* Test for method add( EntryAttribute...)
*/
@Test
public void testAddEntryAttribute() throws Exception
{
Entry entry = new DefaultEntry( schemaManager, EXAMPLE_DN );
Attribute oc = new DefaultAttribute( atObjectClass, "top", "person" );
Attribute cn = new DefaultAttribute( atCN, "test1", "test2" );
Attribute sn = new DefaultAttribute( atSN, "Test1", "Test2" );
Attribute up = new DefaultAttribute( atPwd, BYTES1, BYTES2 );
Attribute email = new DefaultAttribute( atEMail, "FR", "US" );
entry.add( oc, cn, sn, email );
assertEquals( 4, entry.size() );
assertTrue( entry.containsAttribute( "ObjectClass" ) );
assertTrue( entry.containsAttribute( "CN" ) );
assertTrue( entry.containsAttribute( " sn " ) );
assertTrue( entry.containsAttribute( " email " ) );
Attribute attr = entry.get( "objectclass" );
assertEquals( 2, attr.size() );
Attribute email2 = new DefaultAttribute( atEMail, "UK", "DE" );
entry.add( email2, up );
assertEquals( 5, entry.size() );
assertTrue( entry.containsAttribute( "userPassword" ) );
assertTrue( entry.containsAttribute( " email " ) );
Attribute attrC = entry.get( "email" );
assertEquals( 4, attrC.size() );
entry.clear();
}