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