@Test
public void testRemovePrecedingBGP()
throws Exception {

  final String query = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
                       "SELECT * WHERE {\n" + 
                       "   ?movie a <http://www.schema.org/Movie>;\n" +
                       "          <http://www.schema.org/Movie/director> ?director.\n" +
                       "   ?n a ?POF " +
                       "}LIMIT 10\n";
  final String expected = "QueryContainer\n" +
                          " SelectQuery\n" +
                          "  Select ( * )\n" +
                          "  WhereClause\n" +
                          "   GraphPatternGroup\n" +
                          "    BasicGraphPattern\n" +
                          "     TriplesSameSubjectPath\n" +
                          "      Var (n)\n" +
                          "      PropertyListPath\n" +
                          "       PathAlternative\n" +
                          "        PathSequence\n" +
                          "         PathElt\n" +
                          "          IRI (http://www.w3.org/1999/02/22-rdf-syntax-ns#type)\n" +
                          "       ObjectList\n" +
                          "        Var (POF)";
  ast = SyntaxTreeBuilder.parseQuery(query);
  RecommendationScopeProcessor.process(ast);
  assertEquals(expected, ast.dump(""));
}