public AstNode rewrite(final AstNode node, final C context) {
    return rewriter.process(node, context);
  }
@Test
  public void shouldRewriteCSAS() {
    final CreateStreamAsSelect csas = new CreateStreamAsSelect(
        location,
        sourceName,
        query,
        false,
        false,
        csasProperties
    );
    when(mockRewriter.apply(query, context)).thenReturn(rewrittenQuery);

    final AstNode rewritten = rewriter.rewrite(csas, context);

    assertThat(
        rewritten,
        equalTo(
            new CreateStreamAsSelect(
                location,
                sourceName,
                rewrittenQuery,
                false,
                false,
                csasProperties
            )
        )
    );
  }