@Test
public void testReplacePeriodsWithStartEndDates()
{

    EventQueryParams params = new EventQueryParams.Builder()
        .addDimension( new BaseDimensionalObject( PERIOD_DIM_ID, DimensionType.PERIOD, Lists.newArrayList( peA, peB, peC ) ) )
        .build();
    assertNull( params.getStartDate() );
    assertNull( params.getEndDate() );
    params = new EventQueryParams.Builder( params )
        .withStartEndDatesForPeriods().build();
    assertEquals( new DateTime( 2014, 4, 1, 0, 0 ).toDate(), params.getStartDate() );
    assertEquals( new DateTime( 2014, 6, 30, 0, 0 ).toDate(), params.getEndDate() );
}