assertEquals( "Ex+mple", rdn.getValue().getString() );
assertEquals( "Ex+mple", rdn.getNormValue().getString() );
// The first ATAV
Ava atav = rdn.getAva();
assertEquals( " OU = Ex\\+mple ", atav.getName() );
assertEquals( "ou=Ex\\+mple", atav.getNormName() );
assertEquals( "ou", atav.getNormType() );
assertEquals( "OU", atav.getType() );
assertEquals( "Ex+mple", atav.getValue().getValue() );
assertEquals( "Ex+mple", atav.getNormValue().getValue() );
assertEquals( 2, rdn.size() );
// The second ATAV
for ( Ava ava : rdn )
{
if ( "Ex+mple".equals( ava.getNormValue().getValue() ) )
{
// Skip the first one
continue;
}
assertEquals( " cn = T\\+ST\\ ", ava.getName() );
assertEquals( "cn=T\\+ST\\ ", ava.getNormName() );
assertEquals( "cn", ava.getType() );
assertEquals( "cn", ava.getNormType() );
assertEquals( "T+ST", ava.getValue().getValue() );
assertEquals( "T+ST ", ava.getNormValue().getValue() );
}
// ------------------------------------------------------------------
// Now normalize the Dn
dn.apply( schemaManager );
assertEquals( " OU = Ex\\+mple + cn = T\\+ST\\ , ou = COM ", dn.getName() );
assertEquals( "2.5.4.11=ex\\+mple+2.5.4.3=t\\+st,2.5.4.11=com", dn.getNormName() );
// Check the first Rdn
rdn = dn.getRdn();
assertEquals( " OU = Ex\\+mple + cn = T\\+ST\\ ", rdn.getName() );
assertEquals( "2.5.4.11=ex\\+mple+2.5.4.3=t\\+st", rdn.getNormName() );
assertEquals( "OU", rdn.getType() );
assertEquals( "2.5.4.11", rdn.getNormType() );
assertEquals( "Ex+mple", rdn.getValue().getString() );
assertEquals( "ex+mple", rdn.getNormValue().getString() );
// The first ATAV
atav = rdn.getAva();
assertEquals( " OU = Ex\\+mple ", atav.getName() );
assertEquals( "2.5.4.11=ex\\+mple", atav.getNormName() );
assertEquals( "2.5.4.11", atav.getNormType() );
assertEquals( "OU", atav.getType() );
assertEquals( "Ex+mple", atav.getValue().getValue() );
assertEquals( "ex+mple", atav.getNormValue().getValue() );
assertEquals( 2, rdn.size() );
// The second ATAV
for ( Ava ava : rdn )