* 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( SearchResultReferenceTest.class.getResource( "response_with_3_controls_without_value.xml" )
.openStream(), "UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
SearchResultReference searchResultReference = ( ( SearchResponse ) parser.getBatchResponse()
.getCurrentResponse().getDecorated() ).getCurrentSearchResultReference();
Map<String, Control> controls = searchResultReference.getControls();
assertEquals( 3, searchResultReference.getControls().size() );