@Test(expected = NullPointerException.class) public void generateChart_NullCriteriaList() { chartService.generateChart(null, xsettings, ysettings); }
public Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings) { Preconditions.checkNotNull(criteriaList); Preconditions.checkArgument(!criteriaList.isEmpty()); Chart<Object, Number> chart = new Chart<>(); for (JudgmentSeriesCriteria criteria : criteriaList) { Series<Object, Number> series = seriesService.generateSeries(criteria, xsettings, ysettings); chart.addSeries(series); } return chart; }
ChartService { public Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings) { Preconditions.checkNotNull(criteriaList); Preconditions.checkArgument(!criteriaList.isEmpty()); Chart<Object, Number> chart = new Chart<>(); for (JudgmentSeriesCriteria criteria : criteriaList) { Series<Object, Number> series = seriesService.generateSeries(criteria, xsettings, ysettings); chart.addSeries(series); } return chart; } }
ChartService { public Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings) { Preconditions.checkNotNull(criteriaList); Preconditions.checkArgument(!criteriaList.isEmpty()); Chart<Object, Number> chart = new Chart<>(); for (JudgmentSeriesCriteria criteria : criteriaList) { Series<Object, Number> series = seriesService.generateSeries(criteria, xsettings, ysettings); chart.addSeries(series); } return chart; }  }
ChartService { public Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings) { Preconditions.checkNotNull(criteriaList); Preconditions.checkArgument(!criteriaList.isEmpty()); Chart<Object, Number> chart = new Chart<>(); for (JudgmentSeriesCriteria criteria : criteriaList) { Series<Object, Number> series = seriesService.generateSeries(criteria, xsettings, ysettings); chart.addSeries(series); } return chart; }  Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings); @Autowired void setSeriesService(SeriesService seriesService); }
ChartService { public Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings) { Preconditions.checkNotNull(criteriaList); Preconditions.checkArgument(!criteriaList.isEmpty()); Chart<Object, Number> chart = new Chart<>(); for (JudgmentSeriesCriteria criteria : criteriaList) { Series<Object, Number> series = seriesService.generateSeries(criteria, xsettings, ysettings); chart.addSeries(series); } return chart; }  Chart<Object, Number> generateChart(List<JudgmentSeriesCriteria> criteriaList, XSettings xsettings, YSettings ysettings); @Autowired void setSeriesService(SeriesService seriesService);  }