assertFalse( attr2.isHumanReadable() );
assertEquals( NULL_BINARY_VALUE, attr2.get() );
Attribute attr3 = new DefaultAttribute( atCN );
nbAdded = attr3.add( new StringValue( atCN, "a" ), new StringValue( atCN, "b" ) );
assertEquals( 2, nbAdded );
assertTrue( attr3.isHumanReadable() );
assertTrue( attr3.contains( "a" ) );
assertTrue( attr3.contains( "b" ) );
Attribute attr4 = new DefaultAttribute( atCN );
nbAdded = attr4.add( new BinaryValue( atPwd, BYTES1 ), new BinaryValue( atPwd, BYTES2 ) );
assertEquals( 0, nbAdded );
assertTrue( attr4.isHumanReadable() );
assertFalse( attr4.contains( BYTES1 ) );
assertFalse( attr4.contains( BYTES2 ) );
Attribute attr5 = new DefaultAttribute( atCN );
nbAdded = attr5.add( new StringValue( atCN, "c" ), new BinaryValue( atPwd, BYTES1 ) );
assertEquals( 1, nbAdded );
assertTrue( attr5.isHumanReadable() );
assertFalse( attr5.contains( "ab" ) );
assertTrue( attr5.contains( "c" ) );
Attribute attr6 = new DefaultAttribute( atPwd );
nbAdded = attr6.add( new BinaryValue( atPwd, BYTES1 ), new StringValue( atCN, "c" ) );
assertEquals( 1, nbAdded );
assertFalse( attr6.isHumanReadable() );
assertTrue( attr6.contains( BYTES1 ) );
assertFalse( attr6.contains( BYTES3 ) );
Attribute attr7 = new DefaultAttribute( atPwd );
nbAdded = attr7.add( new BinaryValue( atPwd, null ), new StringValue( atCN, "c" ) );
assertEquals( 1, nbAdded );
assertFalse( attr7.isHumanReadable() );
assertTrue( attr7.contains( NULL_BINARY_VALUE ) );
assertFalse( attr7.contains( BYTES3 ) );
Attribute attr8 = new DefaultAttribute( atDC );
nbAdded = attr8.add( new StringValue( atDC, null ), new BinaryValue( atPwd, BYTES1 ) );
assertEquals( 1, nbAdded );
assertTrue( attr8.isHumanReadable() );
assertTrue( attr8.contains( NULL_STRING_VALUE ) );
assertFalse( attr8.contains( "ab" ) );
Attribute attr9 = new DefaultAttribute( atDC );
nbAdded = attr9.add( new StringValue( ( String ) null ), new StringValue( "ab" ) );
assertEquals( 2, nbAdded );
assertTrue( attr9.isHumanReadable() );
assertTrue( attr9.contains( NULL_STRING_VALUE ) );
assertTrue( attr9.contains( "ab" ) );