fixed the wrong assertions.

assertFormulaComparatorEqual ->
assertFormulaOperatorAnd
implemented optimization() for FormulaVariable  and FormulaOperatorAnd.