/**
* Test parsing of a response with MatchedDN attribute
*/
public void testResponseWithMatchedDNAttribute()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser();
parser.setInputFile( SearchResultDoneTest.class.getResource( "response_with_matchedDN_attribute.xml" )
.getFile() );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
SearchResultDone searchResultDone = ( ( SearchResponse ) parser.getBatchResponse().getCurrentResponse() )
.getSearchResultDone();
LdapResult ldapResult = searchResultDone.getLdapResult();
assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDN() );