@SuppressWarnings("unchecked")
  public <T extends Expression> T rewrite(final T expression, final C context) {
    return (T) rewriter.process(expression, context);
  }
@Test
  public void shouldRewriteComparisonExpression() {
    // Given:
    final ComparisonExpression parsed = parseExpression("1 < 2");
    when(processor.apply(parsed.getLeft(), context)).thenReturn(expr1);
    when(processor.apply(parsed.getRight(), context)).thenReturn(expr2);

    // When:
    final Expression rewritten = expressionRewriter.rewrite(parsed, context);

    // Then:
    assertThat(
        rewritten,
        equalTo(new ComparisonExpression(parsed.getLocation(), parsed.getType(), expr1, expr2))
    );
  }