public AstNode rewrite(final AstNode node, final C context) {
    return rewriter.process(node, context);
  }
@Test
  public void shouldRewriteInsertIntoWithPartitionBy() {
    // Given:
    final InsertInto ii = new InsertInto(location, sourceName, query, insertIntoProperties);
    when(mockRewriter.apply(query, context)).thenReturn(rewrittenQuery);
    when(expressionRewriter.apply(expression, context)).thenReturn(rewrittenExpression);

    // When:
    final AstNode rewritten = rewriter.rewrite(ii, context);

    // Then:
    assertThat(
        rewritten,
        equalTo(
            new InsertInto(
                location,
                sourceName,
                rewrittenQuery,
                insertIntoProperties
            )
        )
    );
  }