@Test
public void shouldParseDynamicOperandFromStringContainingLengthOfPropertyValue() {
DynamicOperand operand = parser.parseDynamicOperand(tokens("LENGTH(tableA.property)"), typeSystem, mock(Source.class));
assertThat(operand, is(instanceOf(Length.class)));
Length length = (Length)operand;
assertThat(length.getPropertyValue().getPropertyName(), is("property"));
assertThat(length.getPropertyValue().selectorName(), is(selectorName("tableA")));
assertThat(length.selectorName(), is(selectorName("tableA")));
Source source = new NamedSelector(selectorName("tableA"));
operand = parser.parseDynamicOperand(tokens("LENGTH(property)"), typeSystem, source);
assertThat(operand, is(instanceOf(Length.class)));
length = (Length)operand;
assertThat(length.getPropertyValue().getPropertyName(), is("property"));
assertThat(length.getPropertyValue().selectorName(), is(selectorName("tableA")));
assertThat(length.selectorName(), is(selectorName("tableA")));
}