SurefireSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.onlyOnLanguage("java").name("SurefireSensor"); } SurefireSensor(SurefireJavaParser surefireJavaParser, Configuration settings, FileSystem fs, PathResolver pathResolver); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); @Override String toString();  }
@Test void should_execute_if_filesystem_contains_java_files() { surefireSensor = new SurefireSensor(new SurefireJavaParser(javaResourceLocator), new MapSettings().asConfig(), fs, pathResolver); DefaultSensorDescriptor defaultSensorDescriptor = new DefaultSensorDescriptor(); surefireSensor.describe(defaultSensorDescriptor); assertThat(defaultSensorDescriptor.languages()).containsOnly("java"); }