@Test
public void testOpen() throws Exception {

    BundleContext context = mock(BundleContext.class);
    when(context.getProperty(Constants.FRAMEWORK_UUID)).thenReturn("some-uuid");
    Logger logger = mock(Logger.class);
    Bundle mockSystemBundle = mock(Bundle.class);
    when(mockSystemBundle.getSymbolicName()).thenReturn("the.sytem.bundle");
    when(context.getBundle(0)).thenReturn(mockSystemBundle);
    JMXAgent agent = mock(JMXAgent.class);
    JMXAgentContext agentContext = new JMXAgentContext(context, agent, logger);
    ServiceStateMBeanHandler handler = new ServiceStateMBeanHandler(agentContext, new StateConfig());
    handler.open();
    assertNotNull(handler.getMbean());
}