List<Term> terms1 = new ArrayList<Term>();
terms1.add(var1);
Predicate p1 = new Predicate("King", terms1); // King(x)
List<Term> terms2 = new ArrayList<Term>();
terms2.add(new Constant("John"));
Predicate p2 = new Predicate("King", terms2); // King(John)
Map<Variable, Term> result = unifier.unify(p1, p2, theta);
Assert.assertEquals(theta, result);
Assert.assertEquals(1, theta.keySet().size());
Assert.assertTrue(theta.keySet().contains(new Variable("x"))); // x =
Assert.assertEquals(new Constant("John"), theta.get(var1)); // John
}