in src/main/java/org/apache/sling/junit/impl/servlet/JacocoServlet.java [188:200]
private IAgent getAgent() {
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
try {
ObjectName name = new ObjectName(JMX_NAME);
if (mbs.isRegistered(name)) {
return MBeanServerInvocationHandler.newProxyInstance(mbs, name, IAgent.class, false);
}
} catch (MalformedObjectNameException e) {
log.error("[getAgent] there is a typo in the JMX_NAME constant", e);
}
return null;
}