CodeNarcSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .name("CodeNarc") .onlyOnLanguage(Groovy.KEY) .createIssuesForRuleRepositories(CodeNarcRulesDefinition.REPOSITORY_KEY); } CodeNarcSensor(RulesProfile profile, GroovyFileSystem groovyFileSystem); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }
@Test public void test_description() { DefaultSensorDescriptor defaultSensorDescriptor = new DefaultSensorDescriptor(); sensor.describe(defaultSensorDescriptor); assertThat(defaultSensorDescriptor.languages()).containsOnly(Groovy.KEY); }