### Question:
CDocReportMojo extends AbstractMavenReport { @Override public boolean canGenerateReport() { try { return !getFiles().isEmpty(); } catch (final MavenReportException e) { getLog().error("Unable to determine if report can run; report will not generate.", e); return false; } } CDocReportMojo();  CDocReportMojo(final TextParser textParser, final ScriptExecutionDetailsParser detailsParser); @Override boolean canGenerateReport(); @Override String getDescription(final Locale locale); @Override String getName(final Locale locale); @Override String getOutputName(); @Override boolean isExternalReport();  }### Answer:
@Test public void testCanGenerateReport() { assertThat(new CDocReportMojo(textParser, detailsParser) { @Override List<File> getFiles() { return Collections.singletonList(mock(File.class)); } }.canGenerateReport()).isTrue(); }
@Test public void testCanGenerateReportNoFiles() { assertThat(new CDocReportMojo(textParser, detailsParser) { @Override List<File> getFiles() { return Collections.emptyList(); } }.canGenerateReport()).isFalse(); }