@Test
public void testInspectInputParametersFromJrxml() {

    ImageContentProvider imgContentProvider = new ImageContentProvider( null );
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put( "DATE", "java.util.Date" );
    parameters.put( "DESCRIPTION", "java.lang.String" );
    parameters.put( "MAPSCALE", "java.lang.Integer" );
    parameters.put( "printOptTxt", "java.lang.Boolean" );
    parameters.put( "mapMAP_img", "java.lang.String" );
    parameters.put( "mapMAP_legend", "java.lang.String" );
    List<JAXBElement<? extends ProcessletInputDefinition>> inputs = new ArrayList<JAXBElement<? extends ProcessletInputDefinition>>();
    XMLAdapter adapter = new XMLAdapter(
                                         TestOtherContentProviderTest.class.getResourceAsStream( "../testWPSreportTemplate.jrxml" ) );
    List<String> handledParams = new ArrayList<String>();
    imgContentProvider.inspectInputParametersFromJrxml( new HashMap<String, ParameterDescription>(), inputs,
                                                        adapter, parameters, handledParams );
    assertEquals( 6, parameters.size() );
    // handled
    assertEquals( 2, handledParams.size() );
    assertEquals( 2, inputs.size() );
    JAXBElement<? extends ProcessletInputDefinition> imgUrl = null;
    JAXBElement<? extends ProcessletInputDefinition> imgBin = null;
    for ( JAXBElement<? extends ProcessletInputDefinition> in : inputs ) {
        if ( "mapMAP_img".equals( in.getValue().getIdentifier().getValue() ) ) {
            imgUrl = in;
        } else if ( "mapMAP_legend".equals( in.getValue().getIdentifier().getValue() ) ) {
            imgBin = in;
        }
    }
    assertNotNull( imgUrl );
    assertNotNull( imgBin );
    assertTrue( imgUrl.getDeclaredType() == ComplexInputDefinition.class );
    assertTrue( imgBin.getDeclaredType() == ComplexInputDefinition.class );
    assertEquals( "image/png", ( ( (ComplexInputDefinition) imgUrl.getValue() ).getDefaultFormat().getMimeType() ) );
    assertEquals( 0, ( ( (ComplexInputDefinition) imgUrl.getValue() ).getOtherFormats().size() ) );
}