ArgumentList { static Builder builder() { return new Builder(); } private  ArgumentList(
      Map<String, FunctionCall<AggregateFunctions>> aggregateFunctions,
      Map<String, FunctionCall<NumberingFunctions>> numberingFunctions,
      Set<String> newColumnNames); Map<String, FunctionCall<AggregateFunctions>> getAggregateFunctions(); Map<String, FunctionCall<NumberingFunctions>> getNumberingFunctions(); List<String> getNewColumnNames(); String toSqlString(String windowName); @Override String toString();  }
@Test public void duplicateColsThrows() { Throwable thrown = assertThrows( IllegalArgumentException.class, () -> ArgumentList.builder() .stageFunction("col1", AggregateFunctions.MAX) .unStageFunction("col1Max") .stageFunction("col1", AggregateFunctions.COUNT) .unStageFunction("col1Max") .build()); assertTrue(thrown.getMessage().contains("duplicate column")); }
@Test public void buildWithStagedThrows() { Throwable thrown = assertThrows( IllegalStateException.class, () -> ArgumentList.builder().stageFunction("col1", AggregateFunctions.MAX).build()); assertTrue(thrown.getMessage().contains("Cannot build when a column is staged")); }
@Test public void nothingStaged() { Throwable thrown = assertThrows( IllegalArgumentException.class, () -> ArgumentList.builder() .stageFunction("col1", AggregateFunctions.MAX) .stageFunction("col1", AggregateFunctions.MAX) .build()); assertTrue(thrown.getMessage().contains("Cannot stage a column while another is staged")); }