### Question:
XPathParser { protected PathExpression parsePathExpr( TokenStream tokens ) { boolean relative = true; boolean prependDependentOrSelf = false; if (tokens.canConsume('/')) { if (tokens.canConsume('/')) { if (!tokens.hasNext()) { throw new ParsingException(tokens.previousPosition(), "' } prependDependentOrSelf = true; } relative = false; } PathExpression relativeExpr = parseRelativePathExpr(tokens); PathExpression result = new PathExpression(relative, relativeExpr.getSteps(), relativeExpr.getOrderBy()); if (prependDependentOrSelf) { result.getSteps().add(0, new DescendantOrSelf()); } return result; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }### Answer:
@Test public void shouldParsePathExpressionWithAbbreviatedDescendantOrSelfWithRelativeNamePathPredicate() { assertThat(parser.parsePathExpr(tokenize(" nameTest("c"))))); }
@Test public void shouldParsePathExpressionWithAbbreviatedDescendantOrSelfWithRelativeNumericLiteralPredicate() { assertThat(parser.parsePathExpr(tokenize(" literal("3"))))); }