@Test
public void testASTVar()
throws Exception {

  final String query = "SELECT * { ?s ?p [ <name> ?n ] }";
  final ASTQueryContainer ast = SyntaxTreeBuilder.parseQuery(query);
  final String[] expectedVars = { "n", "p", "s" };
  final String[] actualVars = ASTVarProcessor.process(ast).toArray(new String[0]);
  Arrays.sort(actualVars);
  assertArrayEquals(expectedVars, actualVars);
}