@Test
public void testObjectRemoval()
throws Exception {

  final String q = "SELECT * { ?s ?p \"test\". ?s a <Person>. ?s ?p True. ?s ?p False }";
  ast = SyntaxTreeBuilder.parseQuery(q);
  ContentRemovalProcessor.process(ast);
  final String[] vars = SparqlVarGenerator.getCurrentVarNames();
  assertEquals(3, vars.length);
  final String expectedAst = "QueryContainer\n" +
                              " SelectQuery\n" +
                              "  Select ( * )\n" +
                              "  WhereClause\n" +
                              "   GraphPatternGroup\n" +
                              "    BasicGraphPattern\n" +
                              "     TriplesSameSubjectPath\n" +
                              "      Var (s)\n" +
                              "      PropertyListPath\n" +
                              "       Var (p)\n" +
                              "       ObjectList\n" +
                              "        Var (" + vars[0] + ")\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" +
                              "        IRI (Person)\n" +
                              "     TriplesSameSubjectPath\n" +
                              "      Var (s)\n" +
                              "      PropertyListPath\n" +
                              "       Var (p)\n" +
                              "       ObjectList\n" +
                              "        Var (" + vars[1] + ")\n" +
                              "     TriplesSameSubjectPath\n" +
                              "      Var (s)\n" +
                              "      PropertyListPath\n" +
                              "       Var (p)\n" +
                              "       ObjectList\n" +
                              "        Var (" + vars[2] + ")";
  assertEquals(expectedAst, ast.dump(""));
}