ObjectName baseName = new ObjectName("MBeanServerTEST:type=testIsInstanceOf,name=Base");
ObjectName dynamicName = new ObjectName("MBeanServerTEST:type=testIsInstanceOf,name=Dynamic");
ObjectName doesNotExistName = new ObjectName("MBeanServerTEST:type=testIsInstanceOf,name=DoesNotExist");
server.registerMBean(new Base(), baseName);
server.registerMBean(new Dynamic(), dynamicName);
assertTrue("Base is not an instance of a class that does not exist",
server.isInstanceOf(baseName, "does.not.exist") == false);
assertTrue("FAILS IN RI: Not an instance if the getMBeanInfo reports a class name that does not exist",