AskQuery askQuery = (AskQuery) q;
GraphPattern gp = (GraphPattern) askQuery.getQueryPattern()
.getGraphPatterns().toArray()[0];
Assert.assertTrue(BasicGraphPattern.class.isAssignableFrom(gp.getClass()));
BasicGraphPattern bgp = (BasicGraphPattern) gp;
Set<TriplePattern> triplePatterns = bgp.getTriplePatterns();
Assert.assertTrue(triplePatterns.size()==1);
Assert.assertTrue(triplePatterns.contains(
new SimpleTriplePattern(new Variable(variable),
new UriRef(predicate), new PlainLiteralImpl(object))));