@Test
void invalidExpression() {

    assertThatThrownBy(() -> parser.parse("method()."))
            .isInstanceOf(Error.class)
            .hasMessageContaining("method can only be followed by field or method");
    assertThatThrownBy(() -> parser.parse("method().5"))
            .isInstanceOf(Error.class)
            .hasMessageContaining("value token must not be followed by '.'");
}