SimpleBasicGraphPattern bgp = new SimpleBasicGraphPattern(triplePatterns);
SimpleGroupGraphPattern queryPattern = new SimpleGroupGraphPattern();
queryPattern.addGraphPattern(bgp);
BinaryOperation constraint = new BinaryOperation("<",
price, new LiteralExpression(LiteralFactory.getInstance().createTypedLiteral(30.5)));
queryPattern.addConstraint(constraint);
selectQuery.setQueryPattern(queryPattern);
Assert.assertTrue(selectQuery.toString()
.replaceAll("( |\n)+", " ").trim().equals(queryString));