### Question:
RateBaseSeriesGenerator { public Series<Object, Integer> generateRateBaseSeries(JudgmentSeriesCriteria criteria, XSettings xsettings) { JudgmentSeriesCriteria baseSeriesCriteria = prepareBaseSeriesCriteria(criteria); return seriesGenerator.generateSeries(baseSeriesCriteria, xsettings); }  Series<Object, Integer> generateRateBaseSeries(JudgmentSeriesCriteria criteria, XSettings xsettings); @Autowired void setSeriesGenerator(SeriesGenerator seriesGenerator); @Autowired void setJudgmentSeriesCriteriaCloner(JudgmentSeriesCriteriaCloner judgmentSeriesCriteriaCloner);  }### Answer:
@Test public void generateRateBaseSeries() { JudgmentSeriesCriteria seriesCriteria = mock(JudgmentSeriesCriteria.class); XSettings xsettings = new XSettings(); xsettings.setField(XField.JUDGMENT_DATE); Series<Object, Integer> series = new Series<>(); when(seriesGenerator.generateSeries(seriesCriteria, xsettings)).thenReturn(series); when(judgmentSeriesCriteriaCloner.clone(seriesCriteria)).thenReturn(seriesCriteria); Series<Object, Integer> rateBaseSeries = rateBaseSeriesGenerator.generateRateBaseSeries(seriesCriteria, xsettings); assertTrue(rateBaseSeries == series); InOrder inOrder = Mockito.inOrder(seriesCriteria, seriesGenerator); inOrder.verify(seriesCriteria).setPhrase(null); inOrder.verify(seriesGenerator).generateSeries(seriesCriteria, xsettings); Mockito.verifyNoMoreInteractions(seriesCriteria); Mockito.verifyNoMoreInteractions(seriesGenerator); }