*/
public class EnrichmentTriplesTest {
@Test
public void siblingAddition() {
MGraph base = new SimpleMGraph();
Enricher siblingEnricher = new SiblingEnricher();
TripleCollection enrichmentTriples = new EnrichmentTriples(base,
Collections.singleton(siblingEnricher));
NonLiteral grandMother = new UriRef("http://example.org/grand");
NonLiteral mother = new UriRef("http://example.org/mother");
NonLiteral me = new UriRef("http://example.org/me");
NonLiteral sister = new UriRef("http://example.org/sister");
NonLiteral uncle = new UriRef("http://example.org/uncle");
NonLiteral cousin = new UriRef("http://example.org/cousin");
base.add(new TripleImpl(me, SiblingEnricher.parentProperty, mother));
base.add(new TripleImpl(sister, SiblingEnricher.parentProperty, mother));
base.add(new TripleImpl(mother, SiblingEnricher.parentProperty, grandMother));
base.add(new TripleImpl(uncle, SiblingEnricher.parentProperty, grandMother));
base.add(new TripleImpl(cousin, SiblingEnricher.parentProperty, uncle));
Assert.assertTrue(enrichmentTriples.filter(sister, SiblingEnricher.siblingProperty, me).hasNext());
Assert.assertTrue(enrichmentTriples.filter(uncle, SiblingEnricher.siblingProperty, mother).hasNext());
Assert.assertFalse(enrichmentTriples.filter(uncle, SiblingEnricher.siblingProperty, sister).hasNext());
}