* Test parsing of a response with 2 (optional) Control elements
*/
@Test
public void testResponseWith2Controls()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser( getCodec() );
parser.setInput( ModifyResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(),
"UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
Map<String, Control> controls = modifyResponse.getControls();
assertEquals( 2, modifyResponse.getControls().size() );
Control control = controls.get( "1.2.840.113556.1.4.789" );