CompareExp extends BooleanExp { public CompareExp ne(NestedExp exp) { return new CompareExp("(" + code + " != " + exp.getCode() + ")"); } CompareExp(NestedExp exp); private  CompareExp(String code); CompareExp eq(NestedExp exp); CompareExp ne(NestedExp exp); CompareExp gt(NestedExp exp); CompareExp ge(NestedExp exp); CompareExp lt(NestedExp exp); CompareExp le(NestedExp exp); CompareExp isEqual(NestedExp exp); CompareExp isNotEqual(NestedExp exp);  }
@Test public void testNe() { assertEquals("(4 != 5)", new CompareExp(new ValueExp(4)).ne(new ValueExp(5)).getCode()); }