@Test
public void testWriteCommand() {

	IEvalElement element = new ClassicalB("1<3", FormulaExpand.EXPAND);
	StructuredPrologOutput prologTermOutput = new StructuredPrologOutput();
	EvaluateFormulaCommand command = new EvaluateFormulaCommand(element,
			"root");
	command.writeCommand(prologTermOutput);
	prologTermOutput.fullstop().flush();
	Collection<PrologTerm> sentences = prologTermOutput.getSentences();
	PrologTerm t = sentences.iterator().next();
	assertNotNull(t);
	assertTrue(t instanceof CompoundPrologTerm);
	assertEquals("evaluate_formula", t.getFunctor());
	assertEquals(3, t.getArity());
	PrologTerm t1 = t.getArgument(1);
	assertEquals("root", t1.getFunctor());
	PrologTerm t2 = t.getArgument(2);
	assertEquals("eval", t2.getFunctor());
	PrologTerm t3 = t.getArgument(3);
	assertEquals("Res", t3.getFunctor());
}