@Activate
    public void activate(ComponentContext context) {

        providerService = providerRegistry.register(this);
        appId = coreService.registerApplication(APP_NAME);
        netCfgService.registerConfigFactory(factory);
        netCfgService.addListener(cfgLister);
        connectDevices();
        modified(context);
        log.info("Started");
    }
@Test
    public void testActivate() {
        assertEquals("Incorrect provider service", deviceProviderService, provider.providerService);
        assertEquals("Incorrect application id", applicationId, provider.appId);
        assertTrue("Incorrect config factories", cfgFactories.contains(provider.factory));
        assertTrue("Incorrect network config listener", netCfgListeners.contains(provider.cfgLister));


    }