/**
* 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( ExtendedResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
Control control = extendedResponse.getCurrentControl();
assertEquals( 1, extendedResponse.getControls().size() );
assertTrue( control.getCriticality() );
assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );