FOLParser parser = new FOLParser(domain);
CNFConverter cnfConverter = new CNFConverter(parser);
Sentence s1 = parser.parse("((x1 = y1 AND y1 = z1) => x1 = z1)");
Sentence s2 = parser.parse("((x2 = y2 AND F(y2) = z2) => F(x2) = z2)");
CNF cnf1 = cnfConverter.convertToCNF(s1);
CNF cnf2 = cnfConverter.convertToCNF(s2);
Clause c1 = cnf1.getConjunctionOfClauses().get(0);
Clause c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertFalse(c1.equals(c2));
s1 = parser.parse("((x1 = y1 AND y1 = z1) => x1 = z1)");
s2 = parser.parse("((x2 = y2 AND y2 = z2) => x2 = z2)");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertTrue(c1.equals(c2));
s1 = parser.parse("((x1 = y1 AND y1 = z1) => x1 = z1)");
s2 = parser.parse("((y2 = z2 AND x2 = y2) => x2 = z2)");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertTrue(c1.equals(c2));
s1 = parser.parse("(((x1 = y1 AND y1 = z1) AND z1 = r1) => x1 = r1)");
s2 = parser.parse("(((x2 = y2 AND y2 = z2) AND z2 = r2) => x2 = r2)");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertTrue(c1.equals(c2));
s1 = parser.parse("(((x1 = y1 AND y1 = z1) AND z1 = r1) => x1 = r1)");
s2 = parser.parse("(((z2 = r2 AND y2 = z2) AND x2 = y2) => x2 = r2)");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertTrue(c1.equals(c2));
s1 = parser.parse("(((x1 = y1 AND y1 = z1) AND z1 = r1) => x1 = r1)");
s2 = parser.parse("(((x2 = y2 AND y2 = z2) AND z2 = y2) => x2 = r2)");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertFalse(c1.equals(c2));
s1 = parser
.parse("(((((x1 = y1 AND y1 = z1) AND z1 = r1) AND r1 = q1) AND q1 = s1) => x1 = r1)");
s2 = parser
.parse("(((((x2 = y2 AND y2 = z2) AND z2 = r2) AND r2 = q2) AND q2 = s2) => x2 = r2)");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertTrue(c1.equals(c2));
s1 = parser
.parse("((((NOT(Animal(c1920)) OR NOT(Animal(c1921))) OR NOT(Kills(c1922,c1920))) OR NOT(Kills(c1919,c1921))) OR NOT(Kills(SF0(c1922),SF0(c1919))))");
s2 = parser
.parse("((((NOT(Animal(c1929)) OR NOT(Animal(c1928))) OR NOT(Kills(c1927,c1929))) OR NOT(Kills(c1930,c1928))) OR NOT(Kills(SF0(c1930),SF0(c1927))))");
cnf1 = cnfConverter.convertToCNF(s1);
cnf2 = cnfConverter.convertToCNF(s2);
c1 = cnf1.getConjunctionOfClauses().get(0);
c2 = cnf2.getConjunctionOfClauses().get(0);
Assert.assertTrue(c1.equals(c2));
}