@Test public void loadAllocFreesQueryResult() throws Exception { final QueryResultWithExpectation qrwe = new QueryResultWithExpectation("AllocFrees_internal_queryResult", GROUP); SeriesHandler handler = new SeriesHandler(); qrwe.getQueryResult() .getResults() .stream() .flatMap(result -> result.getSeries().stream()) .forEach(handler::addSeries); final List<TimeSeriesCollection> handlerResult = handler.build().collect(Collectors.toList()); assertThat(handlerResult, createOrderingExceptation(handlerResult)); assertThat(handlerResult, qrwe.getExpectation()); }
public Stream<TimeSeriesCollection> build() { return StreamSupport.stream( Spliterators.spliteratorUnknownSize( new DatumsIterator(datums.entrySet().iterator()), DatumsIterator.SPLITERATOR_CHARACTERISTICS), false); }
SeriesHandler { public Stream<TimeSeriesCollection> build() { return StreamSupport.stream( Spliterators.spliteratorUnknownSize( new DatumsIterator(datums.entrySet().iterator()), DatumsIterator.SPLITERATOR_CHARACTERISTICS), false); } }
SeriesHandler { public Stream<TimeSeriesCollection> build() { return StreamSupport.stream( Spliterators.spliteratorUnknownSize( new DatumsIterator(datums.entrySet().iterator()), DatumsIterator.SPLITERATOR_CHARACTERISTICS), false); }  }
SeriesHandler { public Stream<TimeSeriesCollection> build() { return StreamSupport.stream( Spliterators.spliteratorUnknownSize( new DatumsIterator(datums.entrySet().iterator()), DatumsIterator.SPLITERATOR_CHARACTERISTICS), false); }  Stream<TimeSeriesCollection> build(); void addSeries(QueryResult.Series series); void merge(SeriesHandler other); }
SeriesHandler { public Stream<TimeSeriesCollection> build() { return StreamSupport.stream( Spliterators.spliteratorUnknownSize( new DatumsIterator(datums.entrySet().iterator()), DatumsIterator.SPLITERATOR_CHARACTERISTICS), false); }  Stream<TimeSeriesCollection> build(); void addSeries(QueryResult.Series series); void merge(SeriesHandler other);  }