@Test(expected = NullPointerException.class) public void aggregateFlotSeries_NULL_flotSeries() { flotSeriesAggregatorManager.aggregateFlotSeries(null, 0, NUMBER); }
public FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType) { Preconditions.checkNotNull(flotSeries); Preconditions.checkNotNull(uiyValueType); List<FlotSeriesAggregator> handlingAggregators = flotSeriesAggregators.stream().filter(a->a.handles(uiyValueType)).collect(Collectors.toList()); if (CollectionUtils.isEmpty(handlingAggregators)) { throw new IllegalArgumentException("no " + FlotSeriesAggregator.class.getName() + " handling " + uiyValueType.name()); } return handlingAggregators.get(0).aggregateFlotSeries(flotSeries, flotSeriesIndex); }
FlotSeriesAggregatorManager { public FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType) { Preconditions.checkNotNull(flotSeries); Preconditions.checkNotNull(uiyValueType); List<FlotSeriesAggregator> handlingAggregators = flotSeriesAggregators.stream().filter(a->a.handles(uiyValueType)).collect(Collectors.toList()); if (CollectionUtils.isEmpty(handlingAggregators)) { throw new IllegalArgumentException("no " + FlotSeriesAggregator.class.getName() + " handling " + uiyValueType.name()); } return handlingAggregators.get(0).aggregateFlotSeries(flotSeries, flotSeriesIndex); } }
FlotSeriesAggregatorManager { public FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType) { Preconditions.checkNotNull(flotSeries); Preconditions.checkNotNull(uiyValueType); List<FlotSeriesAggregator> handlingAggregators = flotSeriesAggregators.stream().filter(a->a.handles(uiyValueType)).collect(Collectors.toList()); if (CollectionUtils.isEmpty(handlingAggregators)) { throw new IllegalArgumentException("no " + FlotSeriesAggregator.class.getName() + " handling " + uiyValueType.name()); } return handlingAggregators.get(0).aggregateFlotSeries(flotSeries, flotSeriesIndex); }  }
FlotSeriesAggregatorManager { public FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType) { Preconditions.checkNotNull(flotSeries); Preconditions.checkNotNull(uiyValueType); List<FlotSeriesAggregator> handlingAggregators = flotSeriesAggregators.stream().filter(a->a.handles(uiyValueType)).collect(Collectors.toList()); if (CollectionUtils.isEmpty(handlingAggregators)) { throw new IllegalArgumentException("no " + FlotSeriesAggregator.class.getName() + " handling " + uiyValueType.name()); } return handlingAggregators.get(0).aggregateFlotSeries(flotSeries, flotSeriesIndex); }  FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType); @Autowired void setFlotSeriesAggregators(List<FlotSeriesAggregator> flotSeriesAggregators); }
FlotSeriesAggregatorManager { public FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType) { Preconditions.checkNotNull(flotSeries); Preconditions.checkNotNull(uiyValueType); List<FlotSeriesAggregator> handlingAggregators = flotSeriesAggregators.stream().filter(a->a.handles(uiyValueType)).collect(Collectors.toList()); if (CollectionUtils.isEmpty(handlingAggregators)) { throw new IllegalArgumentException("no " + FlotSeriesAggregator.class.getName() + " handling " + uiyValueType.name()); } return handlingAggregators.get(0).aggregateFlotSeries(flotSeries, flotSeriesIndex); }  FlotSeries aggregateFlotSeries(FlotSeries flotSeries, int flotSeriesIndex, UiyValueType uiyValueType); @Autowired void setFlotSeriesAggregators(List<FlotSeriesAggregator> flotSeriesAggregators);  }