public AstNode rewrite(final AstNode node, final C context) {
    return rewriter.process(node, context);
  }
@Test
  public void shouldRewriteExplainWithQuery() {
    // Given:
    final Explain explain = new Explain(location, Optional.empty(), Optional.of(query));
    when(mockRewriter.apply(query, context)).thenReturn(rewrittenQuery);

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

    // Then:
    assertThat(rewritten, is(new Explain(
        location,
        Optional.empty(),
        Optional.of(rewrittenQuery)
    )));
  }