Object service = new Object();
ServiceReference reference = mock(ServiceReference.class);
BundleContext bundleContext = mock(BundleContext.class);
Logger agentLogger = mock(Logger.class);
JMXAgentContext agentContext = mock(JMXAgentContext.class);
when(agentContext.getBundleContext()).thenReturn(bundleContext);
when(agentContext.getLogger()).thenReturn(agentLogger);
ExecutorService executor = Executors.newSingleThreadExecutor();
when(agentContext.getRegistrationExecutor()).thenReturn(executor);
AbstractCompendiumHandler concreteHandler = new CompendiumHandler(agentContext, "org.osgi.service.Xxx");
target = spy(concreteHandler);
String name = "osgi.compendium:service=xxx,version=1.0";