/**
* Test parsing of a request with a (optional) Control element with Base64 Value
*/
public void testRequestWith1ControlBase64Value()
{
Dsmlv2Parser parser = null;
try
{
parser = new Dsmlv2Parser();
parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
.getFile() );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ModifyDNRequest modifyDNRequest = ( ModifyDNRequest ) parser.getBatchRequest().getCurrentRequest();
Control control = modifyDNRequest.getCurrentControl();
assertEquals( 1, modifyDNRequest.getControls().size() );
assertTrue( control.getCriticality() );
assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );