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