/**
* Test parsing of a response with a Referral and an Error Message
*/
public void testResponseWith1ReferralAndAnErrorMessage()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser();
parser.setInputFile( SearchResultDoneTest.class.getResource(
"response_with_1_referral_and_error_message.xml" ).getFile() );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
SearchResultDone searchResultDone = ( ( SearchResponse ) parser.getBatchResponse().getCurrentResponse() )
.getSearchResultDone();
LdapResult ldapResult = searchResultDone.getLdapResult();
List referrals = ldapResult.getReferrals();