public Statement buildStatement(final ParserRuleContext parseTree) {
    return build(Optional.of(getSources(parseTree)), parseTree);
  }
@Test
  public void shouldFailOnPersistentQueryLimitClauseStream() {
    // Given:
    final SingleStatementContext stmt
            = givenQuery("CREATE STREAM X AS SELECT * FROM TEST1 LIMIT 5;");

    // Then:
    Exception exception = assertThrows(KsqlException.class, () -> {
      builder.buildStatement(stmt);
    });

    String expectedMessage = "CREATE STREAM AS SELECT statements don't support LIMIT clause.";
    String actualMessage = exception.getMessage();

    assertEquals(expectedMessage, actualMessage);
  }