IndexFactory indexFactory = mock(IndexFactory.class);
sonarEngine = new JavaCpdEngine(indexFactory, null, null);
sonarBridgeEngine = new DefaultCpdEngine(indexFactory, new CpdMappings(), null, null, mock(BlockCache.class));
settings = new Settings(new PropertyDefinitions(CpdPlugin.class));
DefaultFileSystem fs = new DefaultFileSystem();
sensor = new CpdSensor(sonarEngine, sonarBridgeEngine, settings, fs);
}