@Test
public void testColumnExcess() {

    DataSetLookup lookup = DataSetLookupFactory.newDataSetLookupBuilder()
            .group(DATE).fixed(DateIntervalType.MONTH, true)
            .column(DATE)
            .column(AMOUNT, AggregateFunctionType.SUM)
            .column(AMOUNT, AggregateFunctionType.AVERAGE)
            .buildLookup();
    ValidationError error = TWO_COLUMNS_GROUPED.check(lookup, METADATA);
    assertNotNull(error);
    assertEquals(error.getCode(), DataSetLookupConstraints.ERROR_COLUMN_NUMBER);
}