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