### Question:
ELExpressionEvaluator implements ExpressionEvaluator { @Override public String evaluate(String expression, PropertyValueResolver resolver) throws UnresolvedExpressionException { PropertiesFunctions.setResolver(resolver); try { ValueExpression ve = expressionFactory.createValueExpression( context, expression, String.class); String value = null; try { value = (String) ve.getValue(context); } catch (ELException ex) { if (ex.getCause() instanceof PropertyNotFoundException) { throw new UnresolvedExpressionException( "expression contains unresolved values: " + expression); } throw ex; } if (value == null) { throw new UnresolvedExpressionException( "expression evaluates to a null value: " + expression); } ve = expressionFactory.createValueExpression(context, value, String.class); if (!ve.isLiteralText()) { throw new UnresolvedExpressionException( "expression contains unresolved values: " + expression + " => " + value); } return value; } finally { PropertiesFunctions.clearResolver(); } }  @Override void init(); @Override String evaluate(String expression, PropertyValueResolver resolver);  }### Answer:
@Test public void testEvaluateSimpleExpression() throws Exception { context.checking(new Expectations() { { oneOf(resolver).resolve("propertyName"); will(returnValue("propertyValue")); } }); assertThat(evaluator.evaluate("${p:required('propertyName')}", resolver), is(equalTo("propertyValue"))); }
@Test public void testEvaluateEscapedPropertyValue() throws Exception { assertThat(evaluator.evaluate(ESCAPED_STRING, resolver), is(equalTo(ESCAPED_CHAR))); }
@Test public void testEvaluateDoubleEscapedPropertyValue() throws Exception { assertThat(evaluator.evaluate(DOUBLE_ESCAPED_STRING, resolver), is(equalTo(ESCAPED_STRING))); }