@Test
public void testHasPeriods()
{

    DataQueryParams params = DataQueryParams.newBuilder().build();
    assertFalse( params.hasPeriods() );
    List<DimensionalItemObject> periods = new ArrayList<>();
    params = DataQueryParams.newBuilder( params )
        .addDimension( new BaseDimensionalObject( PERIOD_DIM_ID, DimensionType.PERIOD, periods ) ).build();
    assertFalse( params.hasPeriods() );
    params = DataQueryParams.newBuilder()
        .removeDimension( PERIOD_DIM_ID ).build();
    assertFalse( params.hasPeriods() );
    periods.add( new Period() );
    params = DataQueryParams.newBuilder()
        .addDimension( new BaseDimensionalObject( PERIOD_DIM_ID, DimensionType.PERIOD, periods ) ).build();
    assertTrue( params.hasPeriods() );
}