XPathParser { protected NameTest parseQName( TokenStream tokens ) { String firstPart = parseNCName(tokens); if (tokens.canConsume(':')) { String secondPart = tokens.consume(); return new NameTest(decode(firstPart), decode(secondPart)); } return new NameTest(null, decode(firstPart)); } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }
@Test public void shouldParseQName() { assertThat(parser.parseQName(tokenize("abc")), is(nameTest("abc"))); assertThat(parser.parseQName(tokenize("abc:def")), is(nameTest("abc", "def"))); }