exec.setProcedureName("pm1.proc1"); //$NON-NLS-1$
exec.setProcedureID("proc"); //$NON-NLS-1$
Function f = new Function("length", new Expression[] { exampleElement(true, 1) }); //$NON-NLS-1$
Function f2 = new Function("+", new Expression[] { f, new Constant(new Integer(1)) }); //$NON-NLS-1$
SPParameter param1 = new SPParameter(1, f2);
exec.setParameter(param1);
// Run symbol mapper
StaticSymbolMappingVisitor visitor = new StaticSymbolMappingVisitor(getSymbolMap());
DeepPreOrderNavigator.doVisit(exec, visitor);
// Check that element got switched
Function afterFunc = (Function) param1.getExpression();
Function innerFunc = (Function) afterFunc.getArgs()[0];
assertEquals("Stored proc param did not get mapped correctly: ", exampleElement(false, 1), innerFunc.getArg(0)); //$NON-NLS-1$
}