Search in sources :

Example 1 with ProvisioningService

use of org.osgi.service.provisioning.ProvisioningService in project aries by apache.

the class ProvisioningServiceMBeanHandlerTest method testConstructInjectMBean.

@Test
public void testConstructInjectMBean() {
    BundleContext bundleContext = mock(BundleContext.class);
    Logger agentLogger = mock(Logger.class);
    JMXAgentContext agentContext = new JMXAgentContext(bundleContext, null, agentLogger);
    ProvisioningService provService = mock(ProvisioningService.class);
    ProvisioningServiceMBeanHandler handler = new ProvisioningServiceMBeanHandler(agentContext);
    StandardMBean mbean = handler.constructInjectMBean(provService);
    assertNotNull(mbean);
}
Also used : StandardMBean(javax.management.StandardMBean) ProvisioningService(org.osgi.service.provisioning.ProvisioningService) JMXAgentContext(org.apache.aries.jmx.agent.JMXAgentContext) Logger(org.apache.aries.jmx.Logger) BundleContext(org.osgi.framework.BundleContext) Test(org.junit.Test)

Aggregations

StandardMBean (javax.management.StandardMBean)1 Logger (org.apache.aries.jmx.Logger)1 JMXAgentContext (org.apache.aries.jmx.agent.JMXAgentContext)1 Test (org.junit.Test)1 BundleContext (org.osgi.framework.BundleContext)1 ProvisioningService (org.osgi.service.provisioning.ProvisioningService)1