@Test(expected = NullPointerException.class) public void convert_NullJudgmentSeriesFilter() { judgmentSeriesFilterConverter.convert(mock(JudgmentGlobalFilter.class), null); }
public JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter) { Preconditions.checkNotNull(globalFilter); Preconditions.checkNotNull(seriesFilter); JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase(seriesFilter.getPhrase()); judgmentSeriesCriteria.setStartJudgmentDate(monthYearStartDateCalculator.calculateStartDate(globalFilter.getJudgmentDateRange().getStartYear(), globalFilter.getJudgmentDateRange().getStartMonth())); judgmentSeriesCriteria.setEndJudgmentDate(monthYearEndDateCalculator.calculateEndDate(globalFilter.getJudgmentDateRange().getEndYear(), globalFilter.getJudgmentDateRange().getEndMonth())); convertCourtCriteria(globalFilter, judgmentSeriesCriteria); return judgmentSeriesCriteria; }
JudgmentSeriesFilterConverter { public JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter) { Preconditions.checkNotNull(globalFilter); Preconditions.checkNotNull(seriesFilter); JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase(seriesFilter.getPhrase()); judgmentSeriesCriteria.setStartJudgmentDate(monthYearStartDateCalculator.calculateStartDate(globalFilter.getJudgmentDateRange().getStartYear(), globalFilter.getJudgmentDateRange().getStartMonth())); judgmentSeriesCriteria.setEndJudgmentDate(monthYearEndDateCalculator.calculateEndDate(globalFilter.getJudgmentDateRange().getEndYear(), globalFilter.getJudgmentDateRange().getEndMonth())); convertCourtCriteria(globalFilter, judgmentSeriesCriteria); return judgmentSeriesCriteria; } }
JudgmentSeriesFilterConverter { public JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter) { Preconditions.checkNotNull(globalFilter); Preconditions.checkNotNull(seriesFilter); JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase(seriesFilter.getPhrase()); judgmentSeriesCriteria.setStartJudgmentDate(monthYearStartDateCalculator.calculateStartDate(globalFilter.getJudgmentDateRange().getStartYear(), globalFilter.getJudgmentDateRange().getStartMonth())); judgmentSeriesCriteria.setEndJudgmentDate(monthYearEndDateCalculator.calculateEndDate(globalFilter.getJudgmentDateRange().getEndYear(), globalFilter.getJudgmentDateRange().getEndMonth())); convertCourtCriteria(globalFilter, judgmentSeriesCriteria); return judgmentSeriesCriteria; }  }
JudgmentSeriesFilterConverter { public JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter) { Preconditions.checkNotNull(globalFilter); Preconditions.checkNotNull(seriesFilter); JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase(seriesFilter.getPhrase()); judgmentSeriesCriteria.setStartJudgmentDate(monthYearStartDateCalculator.calculateStartDate(globalFilter.getJudgmentDateRange().getStartYear(), globalFilter.getJudgmentDateRange().getStartMonth())); judgmentSeriesCriteria.setEndJudgmentDate(monthYearEndDateCalculator.calculateEndDate(globalFilter.getJudgmentDateRange().getEndYear(), globalFilter.getJudgmentDateRange().getEndMonth())); convertCourtCriteria(globalFilter, judgmentSeriesCriteria); return judgmentSeriesCriteria; }  List<JudgmentSeriesCriteria> convertList(JudgmentGlobalFilter globalFilter, List<JudgmentSeriesFilter> seriesFilters); JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter); @Autowired void setMonthYearStartDateCalculator(MonthYearStartDateCalculator monthYearStartDateCalculator); @Autowired void setMonthYearEndDateCalculator(MonthYearEndDateCalculator monthYearEndDateCalculator); }
JudgmentSeriesFilterConverter { public JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter) { Preconditions.checkNotNull(globalFilter); Preconditions.checkNotNull(seriesFilter); JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase(seriesFilter.getPhrase()); judgmentSeriesCriteria.setStartJudgmentDate(monthYearStartDateCalculator.calculateStartDate(globalFilter.getJudgmentDateRange().getStartYear(), globalFilter.getJudgmentDateRange().getStartMonth())); judgmentSeriesCriteria.setEndJudgmentDate(monthYearEndDateCalculator.calculateEndDate(globalFilter.getJudgmentDateRange().getEndYear(), globalFilter.getJudgmentDateRange().getEndMonth())); convertCourtCriteria(globalFilter, judgmentSeriesCriteria); return judgmentSeriesCriteria; }  List<JudgmentSeriesCriteria> convertList(JudgmentGlobalFilter globalFilter, List<JudgmentSeriesFilter> seriesFilters); JudgmentSeriesCriteria convert(JudgmentGlobalFilter globalFilter, JudgmentSeriesFilter seriesFilter); @Autowired void setMonthYearStartDateCalculator(MonthYearStartDateCalculator monthYearStartDateCalculator); @Autowired void setMonthYearEndDateCalculator(MonthYearEndDateCalculator monthYearEndDateCalculator);  }