@Test
public void testInspectInputParametersFromJrxml() {

    OtherContentProvider wmsContentProvider = new OtherContentProvider( 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" );
    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>();
    wmsContentProvider.inspectInputParametersFromJrxml( new HashMap<String, ParameterDescription>(), inputs,
                                                        adapter, parameters, handledParams );
    assertEquals( 4, parameters.size() );
    // handled
    assertEquals( 4, handledParams.size() );
    assertEquals( 4, inputs.size() );
    JAXBElement<? extends ProcessletInputDefinition> pDate = null;
    JAXBElement<? extends ProcessletInputDefinition> pString = null;
    JAXBElement<? extends ProcessletInputDefinition> pInt = null;
    JAXBElement<? extends ProcessletInputDefinition> pBool = null;
    for ( JAXBElement<? extends ProcessletInputDefinition> in : inputs ) {
        if ( "DATE".equals( in.getValue().getIdentifier().getValue() ) ) {
            pDate = in;
        } else if ( "DESCRIPTION".equals( in.getValue().getIdentifier().getValue() ) ) {
            pString = in;
        } else if ( "MAPSCALE".equals( in.getValue().getIdentifier().getValue() ) ) {
            pInt = in;
        } else if ( "printOptTxt".equals( in.getValue().getIdentifier().getValue() ) ) {
            pBool = in;
        }
    }
    assertNotNull( pDate );
    assertNotNull( pString );
    assertNotNull( pInt );
    assertNotNull( pBool );
    assertTrue( pDate.getDeclaredType() == LiteralInputDefinition.class );
    assertTrue( pString.getDeclaredType() == LiteralInputDefinition.class );
    assertTrue( pInt.getDeclaredType() == LiteralInputDefinition.class );
    assertTrue( pBool.getDeclaredType() == LiteralInputDefinition.class );
    assertEquals( "date", ( ( (LiteralInputDefinition) pDate.getValue() ).getDataType().getValue() ) );
    assertEquals( "string", ( ( (LiteralInputDefinition) pString.getValue() ).getDataType().getValue() ) );
    assertEquals( "integer", ( ( (LiteralInputDefinition) pInt.getValue() ).getDataType().getValue() ) );
    assertEquals( "boolean", ( ( (LiteralInputDefinition) pBool.getValue() ).getDataType().getValue() ) );
}