* Test method for add( String, Value<?>... )
*/
@Test
public void testAddStringValueArray() throws LdapException
{
Entry entry = new DefaultEntry();
Value<String> value = new StringValue( ( String ) null );
entry.add( "cn", value );
assertEquals( 1, entry.size() );
Attribute attributeCN = entry.get( "cn" );
assertEquals( 1, attributeCN.size() );
assertNotNull( attributeCN.get() );
assertNull( attributeCN.get().getValue() );
Value<String> value1 = new StringValue( "test1" );
Value<String> value2 = new StringValue( "test2" );
Value<String> value3 = new StringValue( "test1" );
entry.add( "sn", value1, value2, value3 );
assertEquals( 2, entry.size() );
Attribute attributeSN = entry.get( "sn" );
assertEquals( 2, attributeSN.size() );
assertNotNull( attributeSN.get() );
assertTrue( attributeSN.contains( value1 ) );
assertTrue( attributeSN.contains( value2 ) );
Value<byte[]> value4 = new BinaryValue( BYTES1 );
entry.add( "l", value1, value4 );
assertEquals( 3, entry.size() );
Attribute attributeL = entry.get( "l" );
assertEquals( 2, attributeL.size() );
assertNotNull( attributeL.get() );
assertTrue( attributeL.contains( value1 ) );
// The byte[] value must have been transformed to a String