/**
* Test parsing of a response with a (optional) Control element with empty value
*/
public void testResponseWith1ControlEmptyValue()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser();
parser.setInputFile( SearchResultDoneTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
SearchResultDone searchResultDone = ( ( SearchResponse ) parser.getBatchResponse().getCurrentResponse() )
.getSearchResultDone();
Control control = searchResultDone.getCurrentControl();
assertEquals( 1, searchResultDone.getControls().size() );
assertTrue( control.getCriticality() );