@Test
public void testSubjectAndIRIRemoval()
throws Exception {

  final String q = "SELECT * { ?s <name> <test>. ?s <label> <test>. <moi> a <Person>. <moi> ?p <Person> }";
  final String expectedAst = "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 (name)\n" +
                              "       ObjectList\n" +
                              "        Var (IRIn1010444415016862037)\n" +
                              "     TriplesSameSubjectPath\n" +
                              "      Var (s)\n" +
                              "      PropertyListPath\n" +
                              "       PathAlternative\n" +
                              "        PathSequence\n" +
                              "         PathElt\n" +
                              "          IRI (label)\n" +
                              "       ObjectList\n" +
                              "        Var (IRIn1010444415016862037)\n" +
                              "     TriplesSameSubjectPath\n" +
                              "      Var (IRIn8119792335708867021)\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 (IRIn8119792335708867021)\n" +
                              "      PropertyListPath\n" +
                              "       Var (p)\n" +
                              "       ObjectList\n" +
                              "        Var (IRI4869599639157439053)";
  ast = SyntaxTreeBuilder.parseQuery(q);
  ContentRemovalProcessor.process(ast);
  assertEquals(expectedAst, ast.dump(""));
}