}
private CalculationJobResultItem getResultWithLogging(final MockFunction mockFunction, final ThreadLocalLogEventListener logEventListener, final TestCalculationNode calcNode, final CalculationJob calcJob)
throws AsynchronousExecution {
LogBridge.getInstance().addListener(logEventListener);
CalculationJobResult jobResult;
try {
jobResult = calcNode.executeJob(calcJob);
} finally {
LogBridge.getInstance().removeListener(logEventListener);
}
assertNotNull(jobResult);
assertEquals(1, jobResult.getResultItems().size());
final CalculationJobResultItem resultItem = jobResult.getResultItems().get(0);
assertEquals(InvocationResult.SUCCESS, resultItem.getResult());
final ViewComputationCache cache = calcNode.getCache(calcJob.getSpecification());
assertEquals("Result", cache.getValue(mockFunction.getResultSpec()));
return resultItem;
}