Assert.assertEquals(parser.parse("NOT King(x))"), beforeSubst);
}
@Test
public void testConnectiveANDSentenceAndSngleVariable() {
Sentence beforeSubst = parser
.parse("EXISTS x ( King(x) AND BrotherOf(x) = EnemyOf(y) )");
Sentence expectedAfterSubst = parser
.parse("( King(John) AND BrotherOf(John) = EnemyOf(Saladin) )");
Map<Variable, Term> p = new LinkedHashMap<Variable, Term>();
p.put(new Variable("x"), new Constant("John"));
p.put(new Variable("y"), new Constant("Saladin"));
Sentence afterSubst = sv.subst(p, beforeSubst);
Assert.assertEquals(expectedAfterSubst, afterSubst);
Assert.assertEquals(parser
.parse("EXISTS x ( King(x) AND BrotherOf(x) = EnemyOf(y) )"),
beforeSubst);
}