@Test
public void testCQLExpressionParameterContextBboxMappings() {

    desc.getParameter().addAll(Arrays.asList(
            createParam("param1"),
            createParam("param2"),
            createParam("param3"),
            createParam("param4")));
    config.getStoredQueryParameterMappings().addAll(Arrays.asList(
            createBboxExpressionParam("param1", "bboxMinX"),
            createBboxExpressionParam("param2", "bboxMinY"),
            createBboxExpressionParam("param3", "bboxMaxX"),
            createBboxExpressionParam("param4", "bboxMaxY")));
    ParameterTypeFactory factory = new ParameterTypeFactory(config, desc, featureType);
    Map<String, String> viewParams = new HashMap<String, String>();
    Filter f = new FilterFactoryImpl().bbox("nada", -10.0, -5.0, 10.0, 5.0, "WGS:84");
    List<ParameterType> params = factory.buildStoredQueryParameters(viewParams, f);
    assertEquals(4, params.size());
    // Current implementation preserves order and this code takes advantage of it. Preserving
    // the order is not paramount, though
    ParameterType tmp = params.get(0);
    assertEquals("param1", tmp.getName());
    assertEquals("-10.0", tmp.getValue());
    tmp = params.get(1);
    assertEquals("param2", tmp.getName());
    assertEquals("-5.0", tmp.getValue());
    tmp = params.get(2);
    assertEquals("param3", tmp.getName());
    assertEquals("10.0", tmp.getValue());
    tmp = params.get(3);
    assertEquals("param4", tmp.getName());
    assertEquals("5.0", tmp.getValue());
}