/**
* Test parsing of a response with a (optional) Control element
*/
public void testResponseWith1Control()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser();
parser.setInputFile( ModifyResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
assertEquals( 1, modifyResponse.getControls().size() );
Control control = modifyResponse.getCurrentControl();