CompareExp extends BooleanExp { public CompareExp isEqual(NestedExp exp) { return new CompareExp(code + ".equals(" + 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 testIsEqual() { assertEquals("\"firstString\".equals(\"secondString\")", new CompareExp(new ValueExp("firstString")).isEqual(new ValueExp("secondString")).getCode()); }