@Test
public void testDisjointGGPs2()
throws Exception {

  final String q = "SELECT * { ?s <knows> ?o . { SELECT * { ?o ?p ?o2. ?s2 a ?Person OPTIONAL {?s a ?POF} } } }";
  ast = SyntaxTreeBuilder.parseQuery(q);
  final String expected = "QueryContainer\n" +
                          " SelectQuery\n" +
                          "  Select ( * )\n" +
                          "  WhereClause\n" +
                          "   GraphPatternGroup\n" +
                          "    BasicGraphPattern\n" +
                          "     TriplesSameSubjectPath\n" +
                          "      Var (s)\n" +
                          "      PropertyListPath\n" +
                          "       PathAlternative\n" +
                          "        PathSequence\n" +
                          "         PathElt\n" +
                          "          IRI (knows)\n" +
                          "       ObjectList\n" +
                          "        Var (o)\n" +
                          "    GraphPatternGroup\n" +
                          "     SelectQuery\n" +
                          "      Select ( * )\n" +
                          "      WhereClause\n" +
                          "       GraphPatternGroup\n" +
                          "        BasicGraphPattern\n" +
                          "         TriplesSameSubjectPath\n" +
                          "          Var (o)\n" +
                          "          PropertyListPath\n" +
                          "           Var (p)\n" +
                          "           ObjectList\n" +
                          "            Var (o2)\n" +
                          "        OptionalGraphPattern\n" +
                          "         BasicGraphPattern\n" +
                          "          TriplesSameSubjectPath\n" +
                          "           Var (s)\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)";
  RecommendationScopeProcessor.process(ast);
  assertEquals(expected, ast.dump(""));
}