@Test
public void shouldParseSelectWithChildAxisCriteria() {

    query = parse("SELECT * FROM [nt:base] WHERE PATH() LIKE '/a/b/%' AND NOT PATH() LIKE '/a/b/%/%'");
    // SELECT * ...
    assertThat(query.columns().isEmpty(), is(true));
    // FROM ...
    NamedSelector selector = (NamedSelector)query.source();
    assertThat(selector.name(), is(selectorName("nt:base")));
    assertThat(selector.aliasOrName(), is(selectorName("nt:base")));
    assertThat(selector.alias(), is(nullValue()));
    // WHERE ...
    And and = isAnd(query.constraint());
    Comparison comparison1 = isComparison(and.left());
    assertThat(comparison1.getOperand1(), is((DynamicOperand)nodePath(selectorName("nt:base"))));
    assertThat(comparison1.getOperand2(), is((StaticOperand)literal("/a/b/%")));
    Not not = isNot(and.right());
    Comparison comparison2a = isComparison(not.getConstraint());
    assertThat(comparison2a.getOperand1(), is((DynamicOperand)nodePath(selectorName("nt:base"))));
    assertThat(comparison2a.getOperand2(), is((StaticOperand)literal("/a/b/%/%")));
}