@Test public void shouldReturnNullFromParseTextTestIfNotFollowedByOpenAndCloseParenthesis() { assertThat(parser.parseTextTest(tokenize("text x )")), is(nullValue())); assertThat(parser.parseTextTest(tokenize("text(x )")), is(nullValue())); assertThat(parser.parseTextTest(tokenize("text(x")), is(nullValue())); }
protected TextTest parseTextTest( TokenStream tokens ) { if (tokens.canConsume("text", "(", ")")) { return new TextTest(); } return null; }
XPathParser { protected TextTest parseTextTest( TokenStream tokens ) { if (tokens.canConsume("text", "(", ")")) { return new TextTest(); } return null; } }
XPathParser { protected TextTest parseTextTest( TokenStream tokens ) { if (tokens.canConsume("text", "(", ")")) { return new TextTest(); } return null; } XPathParser( TypeSystem context ); }
XPathParser { protected TextTest parseTextTest( TokenStream tokens ) { if (tokens.canConsume("text", "(", ")")) { return new TextTest(); } return null; } XPathParser( TypeSystem context ); Component parseXPath( String xpath ); }
XPathParser { protected TextTest parseTextTest( TokenStream tokens ) { if (tokens.canConsume("text", "(", ")")) { return new TextTest(); } return null; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }