@Test(expected = QueryResolutionException.class)
public void throwsErrorOnExpressionEvaluationError() throws Exception
{
ExpressionManager expressionManager = mock(ExpressionManager.class);
when(expressionManager.parse(DYNAMIC_SQL_TEXT, muleEvent)).thenThrow(new ExpressionRuntimeException(CoreMessages.createStaticMessage("Error")));
DynamicQueryResolver queryResolver = new DynamicQueryResolver(query, null, expressionManager);
queryResolver.resolve(null, muleEvent);
}