### Question:
ExecutionReporterToGenerationReporterAdapter implements GenerationReporter { @Override public void report(ReportLevel level, Report report) { Preconditions.notNull(level); if (level.isWorseThanOrEqualTo(reporter.getReportLevel())) { report.convertArguments(argumentConverter); reporter.report(level, report); } } ExecutionReporterToGenerationReporterAdapter(ExecutionReporter reporter, ArgumentConverter argumentConverter, ModelConverter modelConverter); @Override void testInputGroupGenerated(TestInputGroup testInputGroup, TestInputGroupGenerator generator); @Override void testInputGroupFinished(TestInputGroup testInputGroup); @Override void faultCharacterizationStarted(TestInputGroup testInputGroup, FaultCharacterizationAlgorithm algorithm); @Override void faultCharacterizationFinished(TestInputGroup testInputGroup, List<int[]> failureInducingCombinations); @Override void faultCharacterizationTestInputsGenerated(TestInputGroup testInputGroup, List<int[]> testInputs); @Override void report(ReportLevel level, Report report); @Override void report(ReportLevel level, Supplier<Report> reportSupplier);  }### Answer:
@Test void noReportIfLevelNotWorse() { when(executionReporter.getReportLevel()).thenReturn(ReportLevel.INFO); reporterManager.report(ReportLevel.DEBUG, report("test")); verify(executionReporter, never()).report(eq(ReportLevel.DEBUG), any()); reporterManager.report(ReportLevel.INFO, report("test1")); verify(executionReporter, times(1)).report(ReportLevel.INFO, report("test1")); reporterManager.report(ReportLevel.ERROR, report("test2")); verify(executionReporter, times(1)).report(ReportLevel.ERROR, report("test2")); reporterManager.report(ReportLevel.DEBUG, () -> report("test3")); verify(executionReporter, never()).report(eq(ReportLevel.DEBUG), any()); reporterManager.report(ReportLevel.INFO, () -> report("test4")); verify(executionReporter, times(1)).report(ReportLevel.INFO, report("test4")); reporterManager.report(ReportLevel.ERROR, () -> report("test5")); verify(executionReporter, times(1)).report(ReportLevel.ERROR, report("test5")); }
@Test void argumentsAreConvertedDuringReport() { when(executionReporter.getReportLevel()).thenReturn(ReportLevel.INFO); when(argumentConverter.canConvert(any())).thenReturn(false); when(argumentConverter.canConvert("0")).thenReturn(true); when(argumentConverter.canConvert("1")).thenReturn(true); when(argumentConverter.convert("0")).thenReturn(0); when(argumentConverter.convert("1")).thenReturn(1); reporterManager.report(ReportLevel.INFO, report("test", null, "0", "2", "1")); final ArgumentCaptor<Report> reportCaptor = ArgumentCaptor.forClass(Report.class); verify(executionReporter, times(1)).report(eq(ReportLevel.INFO), reportCaptor.capture()); assertArrayEquals(new Object[]{null, 0, "2", 1}, reportCaptor.getValue().getArguments()); reset(executionReporter); when(executionReporter.getReportLevel()).thenReturn(ReportLevel.INFO); reporterManager.report(ReportLevel.INFO, () -> report("test", "1", 323, null)); verify(executionReporter, times(1)).report(eq(ReportLevel.INFO), reportCaptor.capture()); assertArrayEquals(new Object[]{1, 323, null}, reportCaptor.getValue().getArguments()); }