@Activate
    public void activate(ComponentContext context) {
        providerService = providerRegistry.register(this);
        appId = coreService.registerApplication(APP_NAME);
        controller.addXmppDeviceListener(deviceListener);
        logger.info("Started");
    }
@Test
    public void activate() throws Exception {
        assertTrue("Provider should be registered", deviceRegistry.getProviders().contains(provider.id()));
        assertEquals("Incorrect device service", deviceService, provider.deviceService);
        assertEquals("Incorrect provider service", providerService, provider.providerService);
        assertEquals("Incorrent application id", appId, provider.appId);
        assertNotNull("XMPP device listener should be added", xmppController.listener);
    }