GroovySurefireSensor implements Sensor { @Override public void execute(SensorContext context) { File dir = SurefireUtils.getReportsDirectory(settings, fs, pathResolver); collect(context, dir); } GroovySurefireSensor(GroovySurefireParser groovySurefireParser, Settings settings, FileSystem fs, PathResolver pathResolver); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); @Override String toString();  }
@Test public void shouldNotFailIfReportsNotFound() { Settings settings = mock(Settings.class); when(settings.getString(SurefireUtils.SUREFIRE_REPORTS_PATH_PROPERTY)).thenReturn("unknown"); GroovySurefireSensor surefireSensor = new GroovySurefireSensor(mock(GroovySurefireParser.class), settings, fs, pathResolver); surefireSensor.execute(mock(SensorContext.class)); }