* Test parsing of a response with 3 (optional) Control elements without value
*/
@Test
public void testResponseWith3ControlsWithoutValue()
{
Dsmlv2ResponseParser parser = null;
try
{
parser = new Dsmlv2ResponseParser( getCodec() );
parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
.openStream(), "UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
Map<String, Control> controls = modifyDNResponse.getControls();
assertEquals( 3, modifyDNResponse.getControls().size() );
Control control = controls.get( "1.2.840.113556.1.4.456" );