ATermAppl t = TermFactory.literal("t");
ATermAppl f = TermFactory.literal("f");
AtomIVariable x = new AtomIVariable("x");
List<RuleAtom> body = Arrays.<RuleAtom> asList(new ClassAtom(A, x), new ClassAtom(B, new AtomIConstant(b)));
List<RuleAtom> head = Arrays.<RuleAtom> asList(new DatavaluedPropertyAtom(q, x, new AtomDConstant(t)));
kb.addRule(new Rule(head, body));
body = Arrays.<RuleAtom> asList(new ClassAtom(A, x), new ClassAtom(A, new AtomIConstant(b)));
head = Arrays.<RuleAtom> asList(new DatavaluedPropertyAtom(q, x, new AtomDConstant(f)));
kb.addRule(new Rule(head, body));
body = Arrays.<RuleAtom> asList(new ClassAtom(B, x));
head = Arrays.<RuleAtom> asList(new ClassAtom(C, x));
kb.addRule(new Rule(head, body));
assertIteratorValues(kb.getDataPropertyValues(q, a).iterator(), t);
assertIteratorValues(kb.getDataPropertyValues(q, b).iterator());
assertIteratorValues(kb.getInstances(C).iterator(), b);