### Question:
FlotChartGenerator { public boolean canGenerateChart(ChartCode chartCode, AnalysisForm analysisForm) { return chartGenerator.canGenerateChart(chartCode, analysisForm); }  FlotChart generateFlotChart(ChartCode chartCode, AnalysisForm analysisForm); boolean canGenerateChart(ChartCode chartCode, AnalysisForm analysisForm); @Autowired void setChartGenerator(ChartGenerator chartGenerator); @Autowired void setChartConverter(ChartConverter chartConverter);  }### Answer:
@Test public void canGenerateChart_FALSE() { when(chartGenerator.canGenerateChart(chartCode, analysisForm)).thenReturn(false); assertFalse(flotChartGenerator.canGenerateChart(chartCode, analysisForm)); }
@Test public void canGenerateChart_TRUE() { when(chartGenerator.canGenerateChart(chartCode, analysisForm)).thenReturn(true); assertTrue(flotChartGenerator.canGenerateChart(chartCode, analysisForm)); }