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