SpotBugsSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(SpotBugsSensor.LANGUAGE_KEY) .onlyWhenConfiguration(conf -> conf.hasKey(REPORT_PROPERTY_KEY)) .name("Import of SpotBugs issues"); }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); static final String SPOTBUGS_KEY; static final String FINDSECBUGS_KEY; static final String FBCONTRIB_KEY; static final String REPORT_PROPERTY_KEY; static final ExternalRuleLoader RULE_LOADER; static final ExternalRuleLoader FINDSECBUGS_LOADER; static final ExternalRuleLoader FBCONTRIB_LOADER; }
@Test void test_descriptor() { DefaultSensorDescriptor sensorDescriptor = new DefaultSensorDescriptor(); spotBugsSensor.describe(sensorDescriptor); assertThat(sensorDescriptor.name()).isEqualTo("Import of SpotBugs issues"); assertThat(sensorDescriptor.languages()).containsOnly("java"); ExternalReportTestUtils.assertNoErrorWarnDebugLogs(logTester); }