GroovySensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage(Groovy.KEY).name(this.toString()); } GroovySensor(Settings settings, FileLinesContextFactory fileLinesContextFactory, FileSystem fileSystem); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); @Override String toString();  }
@Test public void test_description() { DefaultSensorDescriptor defaultSensorDescriptor = new DefaultSensorDescriptor(); sensor.describe(defaultSensorDescriptor); assertThat(defaultSensorDescriptor.languages()).containsOnly(Groovy.KEY); }