MVELScriptEvaluator extends ScriptEvaluator { public void evaluate(Object information, ActivityType activityType) { java.util.Map<String,Object> vars=new java.util.HashMap<String, Object>(); vars.put("information", information); vars.put("activity", activityType); MVEL.executeExpression(_compiledExpression, vars); }  @Override void init(); void evaluate(Object information, ActivityType activityType);  }
@Test public void testEvaluate() { MVELScriptEvaluator evaluator=new MVELScriptEvaluator(); ResponseSent rs=new ResponseSent(); evaluator.setExpression("activity.fault = \""+TEST_FAULT+"\""); try { evaluator.init(); } catch (Exception e) { fail("Evaluator should have initialized: "+e); } evaluator.evaluate("", rs); if (!rs.getFault().equals(TEST_FAULT)) { fail("Unexpected fault: "+rs.getFault()); } }