if (expr instanceof Selector) { Selector selector = (Selector) expr; Test[] tests = selector.getTests(); if (tests.length > 0) return tests[0]; }
  Test getNodeTest(Expr expr)  {    if (expr instanceof Selector)      {        Selector selector = (Selector) expr;        Test[] tests = selector.getTests();        if (tests.length > 0)            return tests[0];          }    return null;  }