### Question:
MainChartXSettingsGenerator implements XSettingsGenerator { @Override public boolean handles(ChartCode chartCode) { Preconditions.checkNotNull(chartCode); return chartCode == ChartCode.MAIN_CHART; }  @Override XSettings generateXSettings(JudgmentGlobalFilter judgmentGlobalFilter); @Override boolean canGenerateXSettings(JudgmentGlobalFilter judgmentGlobalFilter); @Override boolean handles(ChartCode chartCode); @Autowired void setMonthYearRangeConverter(MonthYearRangeConverter monthYearRangeConverter);  }### Answer:
@Test(expected = NullPointerException.class) public void handles_NULL() { xsettingsGenerator.handles(null); }
@Test public void handles_FALSE() { xsettingsGenerator.handles(ChartCode.AGGREGATED_MAIN_CHART); }
@Test public void handles_TRUE() { xsettingsGenerator.handles(ChartCode.MAIN_CHART); }