@Test
public void testSetDimensionOptions()
{

    List<DimensionalItemObject> itemsBefore = Lists.newArrayList( createIndicator( 'A', null ),
        createIndicator( 'B', null ), createIndicator( 'C', null ), createIndicator( 'D', null ) );
    List<DimensionalItemObject> itemsAfter = Lists.newArrayList( createIndicator( 'A', null ), createIndicator( 'B', null ) );
    DataQueryParams params = DataQueryParams.newBuilder()
        .addDimension( new BaseDimensionalObject( DimensionalObject.DATA_X_DIM_ID, DimensionType.DATA_X, null, null, itemsBefore ) ).build();
    assertEquals( itemsBefore, params.getDimension( DimensionalObject.DATA_X_DIM_ID ).getItems() );
    params = DataQueryParams.newBuilder( params )
        .withDimensionOptions( DimensionalObject.DATA_X_DIM_ID, itemsAfter ).build();
    assertEquals( itemsAfter, params.getDimension( DimensionalObject.DATA_X_DIM_ID ).getItems() );
}