Registry { public static ExportedValuesMBean export(final Object object) { final Class<? extends Object> aClass = object.getClass(); return export(aClass.getPackage().getName(), aClass.getSimpleName(), object); } private  Registry(); static synchronized Object registerMBean(final ObjectName objectName, final Object mbean); static synchronized void registerIfNotExistsMBean(final ObjectName objectName, final Object mbean); static synchronized Object getRegistered(final ObjectName objectName); static Object getRegistered(final String domain, final String name); static Object registerMBean(final String domain, final String name, final Object object); @Nullable static Object unregister(final Object object); @Nullable static Object unregister(final Class<?> object); @Nullable static Object unregister(final String packageName, final String mbeanName); @Nullable static synchronized Object unregister(final ObjectName objectName); static ExportedValuesMBean export(final Object object); static ExportedValuesMBean export(final Class<?> object); static ExportedValuesMBean export(final String packageName, final String mbeanName,
          final Object... objects); @Nullable static ExportedValuesMBean exportIfNeeded(final String packageName, final String mbeanName,
          final Object... objects); @SuppressFBWarnings("OCP_OVERLY_CONCRETE_PARAMETER") @Deprecated static ExportedValuesMBean export(final String packageName, final String mbeanName,
          final Properties attributes, final Object... objects); @Deprecated static ExportedValuesMBean export(final String packageName, final String mbeanName,
          @Nullable final Map<String, Object> attributes, final Object... objects);  }
@Test public void testClassLocator() throws IOException, InstanceNotFoundException, MBeanException, ReflectionException { Registry.export(Jmx.class); CompositeData info = (CompositeData) Client.callOperation( "service:jmx:rmi: Jmx.class.getPackage().getName(), Jmx.class.getSimpleName(), "getPackageInfo", Registry.class.getName()); LOG.debug("Returned {}", info); Assert.assertNotNull(info); }