* Test parsing of a request with a (optional) Control element with Base64 Value
*/
@Test
public void testRequestWith1ControlBase64Value()
{
Dsmlv2Parser parser = null;
try
{
parser = newParser();
parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
.openStream(), "UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
Map<String, Control> controls = modifyRequest.getControls();
assertEquals( 1, modifyRequest.getControls().size() );
Control control = controls.get( "1.2.840.113556.1.4.643" );