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