DartSensor implements Sensor { @Override public void describe(SensorDescriptor sensorDescriptor) { sensorDescriptor .onlyOnLanguage(Dart.KEY) .name("Dart sensor") .onlyOnFileType(InputFile.Type.MAIN); }  @Override void describe(SensorDescriptor sensorDescriptor); @Override void execute(SensorContext sensorContext); static final String DART_ANALYSIS_USE_EXISTING_OPTIONS_KEY; }
@Test public void describe() { DartSensor sensor = new DartSensor(); DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor(); sensor.describe(descriptor); assertThat(descriptor.name()).isEqualTo("Dart sensor"); }