@Test
public void shouldParseConstraintFromStringWithOrExpressionWithNoParentheses() {
NamedSelector selector = new NamedSelector(selectorName("tableA"));
Constraint constraint = parser.parseConstraint(tokens("ISSAMENODE('/a/b/c') OR CONTAINS(p1,term1)"), typeSystem, selector);
assertThat(constraint, is(instanceOf(Or.class)));
Or or = (Or)constraint;
assertThat(or.left(), is(instanceOf(SameNode.class)));
SameNode same = (SameNode)or.left();
assertThat(same.selectorName(), is(selectorName("tableA")));
assertThat(same.getPath(), is("/a/b/c"));
assertThat(or.right(), is(instanceOf(FullTextSearch.class)));
FullTextSearch search = (FullTextSearch)or.right();
assertThat(search.selectorName(), is(selectorName("tableA")));
assertThat(search.getPropertyName(), is("p1"));
assertThat(search.fullTextSearchExpression(), is("term1"));
}