OSGiModelRuntime { @Activate void activate(final BundleContext ctx) { LOG.info("Model Runtime starting"); moduleRegistry = YangModuleInfoRegistry.create(ctx, contextFactory, parserFactory); bundleTracker = new YangModuleInfoScanner(ctx, moduleRegistry); bundleTracker.open(); moduleRegistry.enableScannerAndUpdate(); LOG.info("Model Runtime started"); }    }
@Test public void testActivate() { doReturn(new Bundle[0]).when(bundleContext).getBundles(); doNothing().when(bundleContext).addBundleListener(any()); target.activate(bundleContext); }