/** * Constructor intentionally private to prevent instantiation by others. * Sets the metadata for this bean. */ private LoggingMXBeanImpl() { setMBeanInfo(ManagementUtils .getMBeanInfo(LoggingMXBean.class.getName())); }
public final void testIsSingleton() { // Verify we always get the same instance LoggingMXBean bean = ManagementUtils.getLoggingBean(); assertSame(mb, bean); }