* Test method put( String... )
*/
@Test
public void testPutStringArray() throws LdapInvalidAttributeValueException
{
Attribute attr1 = new DefaultAttribute( atDC );
int nbAdded = attr1.add( ( String ) null );
assertEquals( 1, nbAdded );
assertTrue( attr1.isHumanReadable() );
assertEquals( NULL_STRING_VALUE, attr1.get() );
Attribute attr2 = new DefaultAttribute( atDC );
nbAdded = attr2.add( "" );
assertEquals( 1, nbAdded );
assertTrue( attr2.isHumanReadable() );
assertEquals( "", attr2.getString() );
Attribute attr3 = new DefaultAttribute( atDC );
nbAdded = attr3.add( "t" );
assertEquals( 1, nbAdded );
assertTrue( attr3.isHumanReadable() );
assertEquals( "t", attr3.getString() );
Attribute attr4 = new DefaultAttribute( atEMail );
nbAdded = attr4.add( "a", "b", "c", "d" );
assertEquals( 4, nbAdded );
assertTrue( attr4.isHumanReadable() );
assertEquals( "a", attr4.getString() );
assertTrue( attr4.contains( "a" ) );
assertTrue( attr4.contains( "b" ) );
assertTrue( attr4.contains( "c" ) );
assertTrue( attr4.contains( "d" ) );
attr4.clear();
nbAdded = attr4.add( "e" );
assertEquals( 1, nbAdded );
assertTrue( attr4.isHumanReadable() );
assertEquals( "e", attr4.getString() );
assertFalse( attr4.contains( "a" ) );
assertFalse( attr4.contains( "b" ) );
assertFalse( attr4.contains( "c" ) );
assertFalse( attr4.contains( "d" ) );
assertTrue( attr4.contains( "e" ) );
attr4.clear();
nbAdded = attr4.add( BYTES1 );
assertEquals( 0, nbAdded );
assertTrue( attr4.isHumanReadable() );
Attribute attr5 = new DefaultAttribute( atEMail );
nbAdded = attr5.add( "a", "b", ( String ) null, "d" );
assertEquals( 4, nbAdded );
assertTrue( attr5.isHumanReadable() );
assertTrue( attr5.contains( "a" ) );
assertTrue( attr5.contains( "b" ) );
assertTrue( attr5.contains( NULL_STRING_VALUE ) );
assertTrue( attr5.contains( "d" ) );
Attribute attr6 = new DefaultAttribute( atPwd );
nbAdded = attr6.add( "a", ( String ) null );
assertEquals( 2, nbAdded );
assertFalse( attr6.isHumanReadable() );
}