OpenEdgeSensor implements Sensor { @Override public void execute(SensorContext context) { if (context.runtime().getProduct() == SonarProduct.SONARLINT) return; computeBaseMetrics(context); }  @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context);  }
@Test public void testMetrics() throws Exception { SensorContextTester context = TestProjectSensorContext.createContext(); OpenEdgeSensor sensor = new OpenEdgeSensor(); sensor.execute(context); Assert.assertEquals(1, context.measure(BASEDIR + ":" + FILE1, OpenEdgeMetrics.PROCEDURES_KEY).value()); Assert.assertEquals(1, context.measure(BASEDIR + ":" + FILE2, OpenEdgeMetrics.PROCEDURES_KEY).value()); }