public Expression rewrite(final Expression expression) {
    return new ExpressionTreeRewriter<>(new OperatorPlugin()::process)
        .rewrite(expression, null);
  }
@Test
  public void shouldThrowParseError() {
    // Given:
    final Expression predicate = getPredicate("SELECT * FROM orders where ROWTIME = '2017-01-01';");
    when(parser.parse(any())).thenThrow(new IllegalArgumentException("it no good"));

    // When:
    final Exception e = assertThrows(
        IllegalArgumentException.class,
        () -> rewriter.rewrite(predicate)
    );

    // Then:
    assertThat(e.getMessage(), containsString("it no good"));
  }