Set<TriplePattern> triplePatterns = constructQuery
.getConstructTemplate();
Assert.assertTrue(triplePatterns.size()==1);
ResourceOrVariable s = new ResourceOrVariable(new UriRef(subject1));
UriRefOrVariable p = new UriRefOrVariable(new UriRef(predicate1));
ResourceOrVariable o = new ResourceOrVariable(new Variable(variable1));
Assert.assertTrue(triplePatterns.contains(
new SimpleTriplePattern(s, p, o)));
GraphPattern gp = (GraphPattern) constructQuery.getQueryPattern()
.getGraphPatterns().toArray()[0];
Assert.assertTrue(BasicGraphPattern.class.isAssignableFrom(gp.getClass()));
BasicGraphPattern bgp = (BasicGraphPattern) gp;
triplePatterns = bgp.getTriplePatterns();
Assert.assertTrue(triplePatterns.size()==1);
s = new ResourceOrVariable(new Variable(variable2));
p = new UriRefOrVariable(new UriRef(predicate2));
Assert.assertTrue(triplePatterns.contains(
new SimpleTriplePattern(s, p, o)));
}