public void testMultipleMBeanServer() throws Exception
{
MBeanServer server1 = MBeanServerFactory.newMBeanServer("domain1");
MBeanServer server2 = MBeanServerFactory.newMBeanServer("domain2");
ClassLoaderRepository clr1 = server1.getClassLoaderRepository();
ClassLoaderRepository clr2 = server2.getClassLoaderRepository();
Method method = clr1.getClass().getDeclaredMethod("getSize", new Class[0]);
method.setAccessible(true);
Integer size1 = (Integer)method.invoke(clr1, new Object[0]);
int initial1 = size1.intValue();
Integer size2 = (Integer)method.invoke(clr2, new Object[0]);