Search in sources :

Example 1 with OSGi

use of org.apache.aries.osgi.functional.OSGi in project aries by apache.

the class ComponentTest method testComponent.

@Test
public void testComponent() throws IOException {
    OSGi<?> program = configurations("org.components.MyComponent").flatMap(props -> services(Service.class).flatMap(ms -> just(new Component(props, ms)).flatMap(component -> register(Component.class, component, new HashMap<>()).distribute(ign -> dynamic(highestService(ServiceOptional.class), component::setOptional, c -> component.setOptional(null)), ign -> dynamic(services(ServiceForList.class), component::addService, component::removeService)))));
    ServiceTracker<Component, Component> serviceTracker = new ServiceTracker<>(_bundleContext, Component.class, null);
    serviceTracker.open();
    CountDownLatch countDownLatch = new CountDownLatch(1);
    _bundleContext.registerService(ManagedService.class, dictionary -> countDownLatch.countDown(), new Hashtable<String, Object>() {

        {
            put("service.pid", "org.components.MyComponent");
        }
    });
    Configuration factoryConfiguration = null;
    try (OSGiResult<?> run = program.run(_bundleContext)) {
        factoryConfiguration = _configurationAdmin.createFactoryConfiguration("org.components.MyComponent");
        factoryConfiguration.update(new Hashtable<>());
        countDownLatch.await(10, TimeUnit.SECONDS);
        assertNull(serviceTracker.getService());
        ServiceRegistration<Service> serviceRegistration = _bundleContext.registerService(Service.class, new Service(), new Hashtable<>());
        Component component = serviceTracker.waitForService(10 * 1000);
        assertNotNull(component);
        assertNull(component.getOptional());
        ServiceRegistration<ServiceOptional> serviceRegistration2 = _bundleContext.registerService(ServiceOptional.class, new ServiceOptional(), new Hashtable<>());
        Thread.sleep(1000L);
        assertNotNull(component.getOptional());
        ServiceOptional serviceOptional = new ServiceOptional();
        ServiceRegistration<ServiceOptional> serviceRegistration3 = _bundleContext.registerService(ServiceOptional.class, serviceOptional, new Hashtable<String, Object>() {

            {
                put("service.ranking", 1);
            }
        });
        assertEquals(serviceOptional, component.getOptional());
        serviceRegistration3.unregister();
        assertNotNull(component.getOptional());
        serviceRegistration2.unregister();
        assertNull(component.getOptional());
        ServiceRegistration<ServiceForList> serviceRegistration4 = _bundleContext.registerService(ServiceForList.class, new ServiceForList(), new Hashtable<>());
        ServiceRegistration<ServiceForList> serviceRegistration5 = _bundleContext.registerService(ServiceForList.class, new ServiceForList(), new Hashtable<>());
        assertEquals(2, component.getServiceForLists().size());
        serviceRegistration4.unregister();
        assertEquals(1, component.getServiceForLists().size());
        serviceRegistration5.unregister();
        assertEquals(0, component.getServiceForLists().size());
        serviceRegistration.unregister();
        assertNull(serviceTracker.getService());
    } catch (IOException ioe) {
    } catch (InterruptedException e) {
        Assert.fail("Timeout waiting for configuration");
    } finally {
        serviceTracker.close();
        if (factoryConfiguration != null) {
            factoryConfiguration.delete();
        }
    }
}
Also used : OSGi.configurations(org.apache.aries.osgi.functional.OSGi.configurations) BeforeClass(org.junit.BeforeClass) TimeoutException(java.util.concurrent.TimeoutException) HashMap(java.util.HashMap) OSGi.onClose(org.apache.aries.osgi.functional.OSGi.onClose) ArrayList(java.util.ArrayList) OSGi.register(org.apache.aries.osgi.functional.OSGi.register) HighestRankingRouter.highest(org.apache.aries.osgi.functional.test.HighestRankingRouter.highest) Configuration(org.osgi.service.cm.Configuration) OSGi.apply(org.apache.aries.osgi.functional.OSGi.apply) ServiceReference(org.osgi.framework.ServiceReference) Hashtable(java.util.Hashtable) ServiceRegistration(org.osgi.framework.ServiceRegistration) AfterClass(org.junit.AfterClass) Assert.assertNotNull(org.junit.Assert.assertNotNull) Test(org.junit.Test) IOException(java.io.IOException) BundleContext(org.osgi.framework.BundleContext) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) CountDownLatch(java.util.concurrent.CountDownLatch) OSGi.just(org.apache.aries.osgi.functional.OSGi.just) Assert.assertNull(org.junit.Assert.assertNull) OSGi.services(org.apache.aries.osgi.functional.OSGi.services) ServiceTracker(org.osgi.util.tracker.ServiceTracker) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) OSGi(org.apache.aries.osgi.functional.OSGi) ManagedService(org.osgi.service.cm.ManagedService) Assert(org.junit.Assert) OSGi.bundleContext(org.apache.aries.osgi.functional.OSGi.bundleContext) FrameworkUtil(org.osgi.framework.FrameworkUtil) OSGiResult(org.apache.aries.osgi.functional.OSGiResult) Dictionary(java.util.Dictionary) Assert.assertEquals(org.junit.Assert.assertEquals) Configuration(org.osgi.service.cm.Configuration) ServiceTracker(org.osgi.util.tracker.ServiceTracker) ManagedService(org.osgi.service.cm.ManagedService) IOException(java.io.IOException) CountDownLatch(java.util.concurrent.CountDownLatch) Test(org.junit.Test)

Example 2 with OSGi

use of org.apache.aries.osgi.functional.OSGi in project aries by apache.

the class DSLTest method testJust.

@Test
public void testJust() {
    AtomicInteger atomicInteger = new AtomicInteger(0);
    OSGi<Integer> just = just(25);
    assertEquals(0, atomicInteger.get());
    try (OSGiResult<Integer> result = just.run(bundleContext, atomicInteger::set)) {
        assertEquals(25, atomicInteger.get());
    }
    atomicInteger.set(0);
    OSGi<Integer> map = just(25).map(s -> s + 5);
    try (OSGiResult<Integer> result = map.run(bundleContext, atomicInteger::set)) {
        assertEquals(30, atomicInteger.get());
    }
    atomicInteger.set(0);
    OSGi<Integer> flatMap = just(25).flatMap(s -> just(s + 10));
    try (OSGiResult<Integer> result = flatMap.run(bundleContext, atomicInteger::set)) {
        assertEquals(35, atomicInteger.get());
    }
    atomicInteger.set(0);
    OSGi<Integer> filter = just(25).filter(s -> s % 2 == 0);
    try (OSGiResult<Integer> result = filter.run(bundleContext, atomicInteger::set)) {
        assertEquals(0, atomicInteger.get());
    }
    atomicInteger.set(0);
    filter = just(25).filter(s -> s % 2 != 0);
    try (OSGiResult<Integer> result = filter.run(bundleContext, atomicInteger::set)) {
        assertEquals(25, atomicInteger.get());
    }
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) OSGi.configurations(org.apache.aries.osgi.functional.OSGi.configurations) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) OSGi.onClose(org.apache.aries.osgi.functional.OSGi.onClose) OSGi.register(org.apache.aries.osgi.functional.OSGi.register) HighestRankingRouter.highest(org.apache.aries.osgi.functional.test.HighestRankingRouter.highest) Configuration(org.osgi.service.cm.Configuration) ConfigurationException(org.osgi.service.cm.ConfigurationException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) OSGi.configuration(org.apache.aries.osgi.functional.OSGi.configuration) ServiceReference(org.osgi.framework.ServiceReference) Hashtable(java.util.Hashtable) ServiceRegistration(org.osgi.framework.ServiceRegistration) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory) InvalidSyntaxException(org.osgi.framework.InvalidSyntaxException) OSGi.serviceReferences(org.apache.aries.osgi.functional.OSGi.serviceReferences) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) BundleContext(org.osgi.framework.BundleContext) TimeUnit(java.util.concurrent.TimeUnit) CountDownLatch(java.util.concurrent.CountDownLatch) OSGi.just(org.apache.aries.osgi.functional.OSGi.just) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) OSGi.services(org.apache.aries.osgi.functional.OSGi.services) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) OSGi(org.apache.aries.osgi.functional.OSGi) FrameworkUtil(org.osgi.framework.FrameworkUtil) OSGiResult(org.apache.aries.osgi.functional.OSGiResult) Dictionary(java.util.Dictionary) Assert.assertEquals(org.junit.Assert.assertEquals) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Test(org.junit.Test)

Example 3 with OSGi

use of org.apache.aries.osgi.functional.OSGi in project aries by apache.

the class DSLTest method testConfigurationsAndRegistrations.

@Test
public void testConfigurationsAndRegistrations() throws InvalidSyntaxException, IOException, InterruptedException {
    ServiceReference<ConfigurationAdmin> serviceReference = bundleContext.getServiceReference(ConfigurationAdmin.class);
    ConfigurationAdmin configurationAdmin = bundleContext.getService(serviceReference);
    /*  For each factory configuration register a service with the property
            key set to the value of the property key that comes with the
            configuration */
    OSGi<ServiceRegistration<Service>> program = configurations("test.configuration").map(d -> d.get("key")).flatMap(key -> register(Service.class, new Service(), new HashMap<String, Object>() {

        {
            put("key", key);
        }
    }));
    OSGiResult<ServiceRegistration<Service>> result = program.run(bundleContext);
    assertEquals(0, bundleContext.getServiceReferences(Service.class, "(test.configuration=*)").size());
    CountDownLatch addedLatch = new CountDownLatch(3);
    ServiceRegistration<?> addedServiceRegistration = bundleContext.registerService(ManagedServiceFactory.class, new ManagedServiceFactory() {

        @Override
        public String getName() {
            return "";
        }

        @Override
        public void updated(String s, Dictionary<String, ?> dictionary) throws ConfigurationException {
            addedLatch.countDown();
        }

        @Override
        public void deleted(String s) {
        }
    }, new Hashtable<String, Object>() {

        {
            put("service.pid", "test.configuration");
        }
    });
    CountDownLatch deletedLatch = new CountDownLatch(3);
    ServiceRegistration<?> deletedServiceRegistration = bundleContext.registerService(ManagedServiceFactory.class, new ManagedServiceFactory() {

        @Override
        public String getName() {
            return "";
        }

        @Override
        public void updated(String s, Dictionary<String, ?> dictionary) throws ConfigurationException {
        }

        @Override
        public void deleted(String s) {
            deletedLatch.countDown();
        }
    }, new Hashtable<String, Object>() {

        {
            put("service.pid", "test.configuration");
        }
    });
    Configuration configuration = configurationAdmin.createFactoryConfiguration("test.configuration");
    configuration.update(new Hashtable<String, Object>() {

        {
            put("key", "service one");
        }
    });
    Configuration configuration2 = configurationAdmin.createFactoryConfiguration("test.configuration");
    configuration2.update(new Hashtable<String, Object>() {

        {
            put("key", "service two");
        }
    });
    Configuration configuration3 = configurationAdmin.createFactoryConfiguration("test.configuration");
    configuration3.update(new Hashtable<String, Object>() {

        {
            put("key", "service three");
        }
    });
    assertTrue(addedLatch.await(10, TimeUnit.SECONDS));
    assertEquals(1, bundleContext.getServiceReferences(Service.class, "(key=service one)").size());
    assertEquals(1, bundleContext.getServiceReferences(Service.class, "(key=service two)").size());
    assertEquals(1, bundleContext.getServiceReferences(Service.class, "(key=service three)").size());
    configuration3.delete();
    configuration2.delete();
    configuration.delete();
    assertTrue(deletedLatch.await(10, TimeUnit.SECONDS));
    assertEquals(0, bundleContext.getServiceReferences(Service.class, "(test.configuration=*)").size());
    addedServiceRegistration.unregister();
    deletedServiceRegistration.unregister();
    result.close();
    bundleContext.ungetService(serviceReference);
}
Also used : OSGi.configurations(org.apache.aries.osgi.functional.OSGi.configurations) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) OSGi.onClose(org.apache.aries.osgi.functional.OSGi.onClose) OSGi.register(org.apache.aries.osgi.functional.OSGi.register) HighestRankingRouter.highest(org.apache.aries.osgi.functional.test.HighestRankingRouter.highest) Configuration(org.osgi.service.cm.Configuration) ConfigurationException(org.osgi.service.cm.ConfigurationException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) OSGi.configuration(org.apache.aries.osgi.functional.OSGi.configuration) ServiceReference(org.osgi.framework.ServiceReference) Hashtable(java.util.Hashtable) ServiceRegistration(org.osgi.framework.ServiceRegistration) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory) InvalidSyntaxException(org.osgi.framework.InvalidSyntaxException) OSGi.serviceReferences(org.apache.aries.osgi.functional.OSGi.serviceReferences) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) BundleContext(org.osgi.framework.BundleContext) TimeUnit(java.util.concurrent.TimeUnit) CountDownLatch(java.util.concurrent.CountDownLatch) OSGi.just(org.apache.aries.osgi.functional.OSGi.just) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) OSGi.services(org.apache.aries.osgi.functional.OSGi.services) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) OSGi(org.apache.aries.osgi.functional.OSGi) FrameworkUtil(org.osgi.framework.FrameworkUtil) OSGiResult(org.apache.aries.osgi.functional.OSGiResult) Dictionary(java.util.Dictionary) Assert.assertEquals(org.junit.Assert.assertEquals) Configuration(org.osgi.service.cm.Configuration) HashMap(java.util.HashMap) CountDownLatch(java.util.concurrent.CountDownLatch) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory) ConfigurationException(org.osgi.service.cm.ConfigurationException) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) ServiceRegistration(org.osgi.framework.ServiceRegistration) Test(org.junit.Test)

Example 4 with OSGi

use of org.apache.aries.osgi.functional.OSGi in project aries by apache.

the class DSLTest method testApplicativeApplyTo.

@Test
public void testApplicativeApplyTo() {
    AtomicInteger integer = new AtomicInteger(0);
    OSGi<Integer> program = just(5).applyTo(just((i) -> i + 5));
    program.run(bundleContext, integer::set);
    assertEquals(10, integer.get());
}
Also used : OSGi.configurations(org.apache.aries.osgi.functional.OSGi.configurations) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) OSGi.onClose(org.apache.aries.osgi.functional.OSGi.onClose) OSGi.register(org.apache.aries.osgi.functional.OSGi.register) HighestRankingRouter.highest(org.apache.aries.osgi.functional.test.HighestRankingRouter.highest) Configuration(org.osgi.service.cm.Configuration) ConfigurationException(org.osgi.service.cm.ConfigurationException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) OSGi.configuration(org.apache.aries.osgi.functional.OSGi.configuration) ServiceReference(org.osgi.framework.ServiceReference) Hashtable(java.util.Hashtable) ServiceRegistration(org.osgi.framework.ServiceRegistration) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory) InvalidSyntaxException(org.osgi.framework.InvalidSyntaxException) OSGi.serviceReferences(org.apache.aries.osgi.functional.OSGi.serviceReferences) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) BundleContext(org.osgi.framework.BundleContext) TimeUnit(java.util.concurrent.TimeUnit) CountDownLatch(java.util.concurrent.CountDownLatch) OSGi.just(org.apache.aries.osgi.functional.OSGi.just) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) OSGi.services(org.apache.aries.osgi.functional.OSGi.services) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) OSGi(org.apache.aries.osgi.functional.OSGi) FrameworkUtil(org.osgi.framework.FrameworkUtil) OSGiResult(org.apache.aries.osgi.functional.OSGiResult) Dictionary(java.util.Dictionary) Assert.assertEquals(org.junit.Assert.assertEquals) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Test(org.junit.Test)

Example 5 with OSGi

use of org.apache.aries.osgi.functional.OSGi in project aries by apache.

the class ComponentTest method testComponentApplicative.

@Test
public void testComponentApplicative() throws IOException, TimeoutException {
    OSGi<?> program = apply(Component::new, configurations("org.components.MyComponent"), services(Service.class)).flatMap(comp -> register(Component.class, comp, new HashMap<>()).distribute(ign -> dynamic(highestService(ServiceOptional.class), comp::setOptional, c -> comp.setOptional(null)), ign -> dynamic(services(ServiceForList.class), comp::addService, comp::removeService)));
    ServiceTracker<Component, Component> serviceTracker = new ServiceTracker<>(_bundleContext, Component.class, null);
    serviceTracker.open();
    Configuration factoryConfiguration = null;
    try (OSGiResult<?> run = program.run(_bundleContext)) {
        factoryConfiguration = _configurationAdmin.createFactoryConfiguration("org.components.MyComponent");
        factoryConfiguration.update(new Hashtable<>());
        Thread.sleep(1000);
        assertNull(serviceTracker.getService());
        ServiceRegistration<Service> serviceRegistration = _bundleContext.registerService(Service.class, new Service(), new Hashtable<>());
        Component component = serviceTracker.waitForService(10 * 1000);
        assertNotNull(component);
        ServiceRegistration<Service> serviceRegistration10 = _bundleContext.registerService(Service.class, new Service(), new Hashtable<>());
        assertEquals(2, serviceTracker.getServiceReferences().length);
        Configuration factoryConfiguration2 = _configurationAdmin.createFactoryConfiguration("org.components.MyComponent");
        factoryConfiguration2.update(new Hashtable<>());
        Thread.sleep(1000);
        assertEquals(4, serviceTracker.getServiceReferences().length);
        factoryConfiguration2.delete();
        Thread.sleep(1000);
        assertEquals(2, serviceTracker.getServiceReferences().length);
        serviceRegistration10.unregister();
        assertNull(component.getOptional());
        ServiceRegistration<ServiceOptional> serviceRegistration2 = _bundleContext.registerService(ServiceOptional.class, new ServiceOptional(), new Hashtable<>());
        Thread.sleep(1000L);
        assertNotNull(component.getOptional());
        ServiceOptional serviceOptional = new ServiceOptional();
        ServiceRegistration<ServiceOptional> serviceRegistration3 = _bundleContext.registerService(ServiceOptional.class, serviceOptional, new Hashtable<String, Object>() {

            {
                put("service.ranking", 1);
            }
        });
        assertEquals(serviceOptional, component.getOptional());
        serviceRegistration3.unregister();
        assertNotNull(component.getOptional());
        serviceRegistration2.unregister();
        assertNull(component.getOptional());
        ServiceRegistration<ServiceForList> serviceRegistration4 = _bundleContext.registerService(ServiceForList.class, new ServiceForList(), new Hashtable<>());
        ServiceRegistration<ServiceForList> serviceRegistration5 = _bundleContext.registerService(ServiceForList.class, new ServiceForList(), new Hashtable<>());
        assertEquals(2, component.getServiceForLists().size());
        serviceRegistration4.unregister();
        assertEquals(1, component.getServiceForLists().size());
        serviceRegistration5.unregister();
        assertEquals(0, component.getServiceForLists().size());
        serviceRegistration.unregister();
        assertNull(serviceTracker.getService());
    } catch (IOException ioe) {
    } catch (InterruptedException e) {
        Assert.fail("Timeout waiting for configuration");
    } finally {
        serviceTracker.close();
        if (factoryConfiguration != null) {
            factoryConfiguration.delete();
        }
    }
}
Also used : OSGi.configurations(org.apache.aries.osgi.functional.OSGi.configurations) BeforeClass(org.junit.BeforeClass) TimeoutException(java.util.concurrent.TimeoutException) HashMap(java.util.HashMap) OSGi.onClose(org.apache.aries.osgi.functional.OSGi.onClose) ArrayList(java.util.ArrayList) OSGi.register(org.apache.aries.osgi.functional.OSGi.register) HighestRankingRouter.highest(org.apache.aries.osgi.functional.test.HighestRankingRouter.highest) Configuration(org.osgi.service.cm.Configuration) OSGi.apply(org.apache.aries.osgi.functional.OSGi.apply) ServiceReference(org.osgi.framework.ServiceReference) Hashtable(java.util.Hashtable) ServiceRegistration(org.osgi.framework.ServiceRegistration) AfterClass(org.junit.AfterClass) Assert.assertNotNull(org.junit.Assert.assertNotNull) Test(org.junit.Test) IOException(java.io.IOException) BundleContext(org.osgi.framework.BundleContext) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) CountDownLatch(java.util.concurrent.CountDownLatch) OSGi.just(org.apache.aries.osgi.functional.OSGi.just) Assert.assertNull(org.junit.Assert.assertNull) OSGi.services(org.apache.aries.osgi.functional.OSGi.services) ServiceTracker(org.osgi.util.tracker.ServiceTracker) ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin) OSGi(org.apache.aries.osgi.functional.OSGi) ManagedService(org.osgi.service.cm.ManagedService) Assert(org.junit.Assert) OSGi.bundleContext(org.apache.aries.osgi.functional.OSGi.bundleContext) FrameworkUtil(org.osgi.framework.FrameworkUtil) OSGiResult(org.apache.aries.osgi.functional.OSGiResult) Dictionary(java.util.Dictionary) Assert.assertEquals(org.junit.Assert.assertEquals) Configuration(org.osgi.service.cm.Configuration) ServiceTracker(org.osgi.util.tracker.ServiceTracker) ManagedService(org.osgi.service.cm.ManagedService) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

IOException (java.io.IOException)5 Dictionary (java.util.Dictionary)5 HashMap (java.util.HashMap)5 Hashtable (java.util.Hashtable)5 CountDownLatch (java.util.concurrent.CountDownLatch)5 TimeUnit (java.util.concurrent.TimeUnit)5 OSGi (org.apache.aries.osgi.functional.OSGi)5 OSGi.configurations (org.apache.aries.osgi.functional.OSGi.configurations)5 OSGi.just (org.apache.aries.osgi.functional.OSGi.just)5 OSGi.onClose (org.apache.aries.osgi.functional.OSGi.onClose)5 OSGi.register (org.apache.aries.osgi.functional.OSGi.register)5 OSGi.services (org.apache.aries.osgi.functional.OSGi.services)5 OSGiResult (org.apache.aries.osgi.functional.OSGiResult)5 HighestRankingRouter.highest (org.apache.aries.osgi.functional.test.HighestRankingRouter.highest)5 Assert.assertEquals (org.junit.Assert.assertEquals)5 Assert.assertNotNull (org.junit.Assert.assertNotNull)5 Assert.assertNull (org.junit.Assert.assertNull)5 Test (org.junit.Test)5 BundleContext (org.osgi.framework.BundleContext)5 FrameworkUtil (org.osgi.framework.FrameworkUtil)5