public static KsqlWindowExpression parseWindowExpression(final String expressionText) {
    final ParserRuleContext parseTree = GrammarParseUtil.getParseTree(
        expressionText,
        SqlBaseParser::windowExpression
    );
    final WindowExpression windowExpression =
        new AstBuilder(TypeRegistry.EMPTY).buildWindowExpression(parseTree);
    return windowExpression.getKsqlWindowExpression();
  }
@Test
  public void shouldParseWindowExpression() {
    // When:
    final KsqlWindowExpression parsed = ExpressionParser.parseWindowExpression(
        "TUMBLING (SIZE 1 DAYS)"
    );

    // Then:
    assertThat(
        parsed,
        equalTo(new TumblingWindowExpression(
            parsed.getLocation(),
            new WindowTimeClause(1, TimeUnit.DAYS),
            Optional.empty(),
            Optional.empty()))
    );
  }