DataQueryGroups { public static Builder newBuilder() { return new Builder(); } private  DataQueryGroups(); static Builder newBuilder(); List<DataQueryParams> getAllQueries(); List<List<DataQueryParams>> getSequentialQueries(); boolean isOptimal( int optimalQueries ); int getLargestGroupSize(); @Override String toString();  }
@Test public void getQueryA() { DimensionalObject dimA = new BaseDimensionalObject( DimensionalObject.DATA_X_DIM_ID, DimensionType.DATA_X, getList( deA, deB ) ); DimensionalObject dimB = new BaseDimensionalObject( DimensionalObject.ORGUNIT_DIM_ID, DimensionType.ORGANISATION_UNIT, getList( ouA, ouB, ouC ) ); DimensionalObject dimC = new BaseDimensionalObject( DimensionalObject.PERIOD_DIM_ID, DimensionType.PERIOD, getList( createPeriod( "2000Q1" ) ) ); DataQueryParams paramsA = DataQueryParams.newBuilder() .addDimension( dimA ) .addDimension( dimB ) .addFilter( dimC ).build(); assertNotNull( paramsA.getDimension( DimensionalObject.DATA_X_DIM_ID ) ); assertNotNull( paramsA.getDimension( DimensionalObject.ORGUNIT_DIM_ID ) ); assertNotNull( paramsA.getFilter( DimensionalObject.PERIOD_DIM_ID ) ); assertEquals( 2, paramsA.getDimension( DimensionalObject.DATA_X_DIM_ID ).getItems().size() ); assertEquals( 3, paramsA.getDimension( DimensionalObject.ORGUNIT_DIM_ID ).getItems().size() ); assertEquals( 1, paramsA.getFilter( DimensionalObject.PERIOD_DIM_ID ).getItems().size() ); }