ExpressionExtractor implements Extractor<T>, Serializable, PortableObject { public T extract(Object target) { if (target == null) { return null; } return expression.evaluate(target, variables); } ExpressionExtractor();  ExpressionExtractor(String expression);  ExpressionExtractor(Expression<T> expression);  ExpressionExtractor(Expression<T> expression,
                               Map<String, Object> variables); T extract(Object target); void readExternal(PofReader reader); void writeExternal(PofWriter writer); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@SuppressWarnings("unchecked") @Test public void testExtractionWithVariables() { Person person = createTestTarget(); Extractor ext = new ExpressionExtractor(new MvelExpression("name + ' ' + lastName"), Collections.<String, Object>singletonMap("lastName", "Simpson")); assertEquals("Homer Simpson", ext.extract(person)); }