// Wrap custom expression factory
ExpressionFactory wrappedExpressionFactory = getCurrentManager().wrapExpressionFactory(new DummyExpressionFactory());
// Create method expression and invoke it with supplied EL context (porting package)
MethodExpression methodExpression = wrappedExpressionFactory.createMethodExpression(null, "foo.test", String.class,
null);
Object methodElResult = methodExpression.invoke(getCurrentConfiguration().getEl().createELContext(getCurrentManager()),
null);
assertNotNull(methodElResult);
assertTrue(methodElResult instanceof Integer);