* Test parsing of a response with MatchedDN attribute
*/
@Test
public void testResponseWithMatchedDNAttribute()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser( getCodec() );
parser.setInput(
AuthResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" ).openStream(), "UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
BindResponse bindResponse = ( BindResponse ) parser.getBatchResponse().getCurrentResponse();
LdapResult ldapResult = bindResponse.getLdapResult();
assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDn().getNormName() );
}