ImmutableList<File> files = ImmutableList.of(new File("src/test/resources/cpd/Person.js"));
when(fs.files(any(FileQuery.class))).thenReturn(files);
SensorContext context = mock(SensorContext.class);
JavaScriptSquidSensor sensor = new JavaScriptSquidSensor(mock(RulesProfile.class), fileLinesContextFactory, mock(ResourcePerspectives.class), fs, new NoSonarFilter());
sensor.analyse(project, context);
verify(context).saveMeasure(any(Resource.class), eq(CoreMetrics.LINES), eq(32.0));
verify(context).saveMeasure(any(Resource.class), eq(CoreMetrics.NCLOC), eq(18.0));