use of org.camunda.bpm.dmn.engine.impl.evaluation.ExpressionEvaluationHandler in project camunda-engine-dmn by camunda.
the class ExpressionCachingTest method setup.
@Before
public void setup() {
ScriptEngineManager scriptEngineManager = spy(new ScriptEngineManager());
when(scriptEngineManager.getEngineByName(anyString())).then(new Answer<ScriptEngine>() {
public ScriptEngine answer(InvocationOnMock invocation) throws Throwable {
scriptEngineSpy = spy((ScriptEngine) invocation.callRealMethod());
compilableSpy = (Compilable) scriptEngineSpy;
return scriptEngineSpy;
}
});
DefaultDmnEngineConfiguration configuration = new DefaultDmnEngineConfiguration();
configuration.setScriptEngineResolver(new DefaultScriptEngineResolver(scriptEngineManager));
configuration.init();
elProviderSpy = spy(configuration.getElProvider());
configuration.setElProvider(elProviderSpy);
expressionEvaluationHandler = new ExpressionEvaluationHandler(configuration);
}
Aggregations