Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
attrs.put( "ou", "UnderReferral" );
try
{
ctx.createSubcontext( "ou=UnderReferral,uid=akarasuluref,ou=users,ou=system", attrs );
fail( "Should never get here: add should fail with ReferralExcpetion" );
}
catch( ReferralException e )
{
assertEquals( "ldap://localhost:10389/ou=UnderReferral,uid=akarasulu,ou=users,ou=system", e.getReferralInfo() );