@Test
public void testGetAggregationType()
{

    AnalyticsAggregationType typeA = new AnalyticsAggregationType( AggregationType.SUM, AggregationType.AVERAGE, DataType.NUMERIC, true );
    AnalyticsAggregationType typeB = new AnalyticsAggregationType( AggregationType.AVERAGE, AggregationType.AVERAGE, DataType.NUMERIC, true );
    
    assertEquals( typeA, 
        QueryPlannerUtils.getAggregationType( new AnalyticsAggregationType( AggregationType.SUM, AggregationType.AVERAGE ), ValueType.INTEGER, 
            new QuarterlyPeriodType(), new YearlyPeriodType() ) );
    
    assertEquals( typeB, 
        QueryPlannerUtils.getAggregationType( new AnalyticsAggregationType( AggregationType.AVERAGE, AggregationType.AVERAGE ), ValueType.INTEGER, 
            new QuarterlyPeriodType(), new YearlyPeriodType() ) );
}