public AggregateParams create(
      final LogicalSchema schema,
      final List<ColumnName> nonAggregateColumns,
      final FunctionRegistry functionRegistry,
      final List<FunctionCall> functionList,
      final boolean windowedAggregation,
      final KsqlConfig config
  ) {
    return create(
        schema,
        nonAggregateColumns,
        functionRegistry,
        functionList,
        false,
        windowedAggregation,
        config
    );
  }
@Test
  public void shouldReturnCorrectWindowedSchema() {
    // Given:
    aggregateParams = new AggregateParamsFactory(udafFactory, undoUdafFactory).create(
        INPUT_SCHEMA,
        NON_AGG_COLUMNS,
        functionRegistry,
        FUNCTIONS,
        true,
        KsqlConfig.empty()
    );

    // When:
    final LogicalSchema schema = aggregateParams.getSchema();

    // Then:
    assertThat(
        schema,
        equalTo(
            LogicalSchema.builder()
                .keyColumns(INPUT_SCHEMA.key())
                .valueColumn(ColumnName.of("REQUIRED0"), SqlTypes.BIGINT)
                .valueColumn(ColumnName.of("REQUIRED1"), SqlTypes.STRING)
                .valueColumn(ColumnNames.aggregateColumn(0), SqlTypes.INTEGER)
                .valueColumn(ColumnNames.aggregateColumn(1), SqlTypes.STRING)
                .valueColumn(SystemColumns.WINDOWSTART_NAME, SystemColumns.WINDOWBOUND_TYPE)
                .valueColumn(SystemColumns.WINDOWEND_NAME, SystemColumns.WINDOWBOUND_TYPE)
                .build()
        )
    );
  }