.createRingOfThievesKnowledgeBase(infp);
List<Term> terms = new ArrayList<Term>();
terms.add(new Variable("x"));
Predicate query = new Predicate("Skis", terms);
InferenceResult answer = rotkb.ask(query);
Assert.assertTrue(null != answer);
Assert.assertFalse(answer.isPossiblyFalse());
Assert.assertTrue(answer.isTrue());
Assert.assertFalse(answer.isUnknownDueToTimeout());
// DB can expand infinitely so is only partial.
Assert.assertTrue(answer.isPartialResultDueToTimeout());
Assert.assertEquals(4, answer.getProofs().size());
Assert.assertEquals(1, answer.getProofs().get(0).getAnswerBindings()
.size());
Assert.assertEquals(1, answer.getProofs().get(1).getAnswerBindings()
.size());
Assert.assertEquals(1, answer.getProofs().get(2).getAnswerBindings()
.size());
Assert.assertEquals(1, answer.getProofs().get(3).getAnswerBindings()
.size());
List<Constant> expected = new ArrayList<Constant>();
expected.add(new Constant("Nancy"));
expected.add(new Constant("Red"));
expected.add(new Constant("Bert"));
expected.add(new Constant("Drew"));
for (Proof p : answer.getProofs()) {
expected.remove(p.getAnswerBindings().get(new Variable("x")));
}
Assert.assertEquals(0, expected.size());
}