EvaluateFormulasCommand extends AbstractCommand { @Override public void processResult(final ISimplifiedROMap<String, PrologTerm> bindings) { ListPrologTerm terms = BindingGenerator.getList(bindings, EVALUATE_RESULT_VARIABLE); for (PrologTerm term : terms) { values.add(EvalResult.getEvalResult(term)); } } EvaluateFormulasCommand(final List<IEvalElement> evalElements, final String stateId); @Override void processResult(final ISimplifiedROMap<String, PrologTerm> bindings); @Override void writeCommand(final IPrologTermOutput pout); List<AbstractEvalResult> getValues(); Map<IEvalElement, AbstractEvalResult> getResultMap();  }
@Test public void testProcessResult() { IEvalElement element = new ClassicalB("1<3", FormulaExpand.EXPAND); final CompoundPrologTerm lpt = mkResult("true"); ISimplifiedROMap<String, PrologTerm> m1 = key -> lpt; EvaluateFormulaCommand command = new EvaluateFormulaCommand(element, "root"); command.processResult(m1); AbstractEvalResult value = command.getValue(); assertEquals("true", ((EvalResult) value).getValue()); assertEquals("3", ((EvalResult) value).getSolutions().get("a")); }