/**
* Test parsing of a request with 3 (optional) Control elements without value
*/
public void testRequestWith3ControlsWithoutValue()
{
Dsmlv2Parser parser = null;
try
{
parser = new Dsmlv2Parser();
parser.setInput( SearchRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
.openStream(), "UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
Control control = searchRequest.getCurrentControl();
assertEquals( 3, searchRequest.getControls().size() );
assertTrue( control.getCriticality() );
assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );