assertEquals(t, s.getMapping(v2) );
}
public void testFunctionVarMapping()
{
Fact f1 = makeFact("legal ?x");
TermFunction tf = getTermFunction("mark ?y ?z");
TermVariable varX = getVariable("?x");
TermVariable varY = getVariable("?y");
TermVariable varZ = getVariable("?z");
Substitution s = new Substitution();
s.addMapping(varX, tf);
s.addMapping(varY, getTermObject("1"));
s.addMapping(varZ, getTermObject("2"));
Fact result = (Fact) f1.applySubstitution(s);
assertEquals( makeFact("legal (mark 1 2)"), result );
}