MBeanServer server = MBeanServerFactory.newMBeanServer();
ObjectName baseName = new ObjectName("MBeanServerTEST:type=testIsInstanceOf,name=Base");
ObjectName derivedName = new ObjectName("MBeanServerTEST:type=testIsInstanceOf,name=Derived");
ObjectName unrelatedName = new ObjectName("MBeanServerTEST:type=testIsInstanceOf,name=Unrelated");
server.registerMBean(new Base(), baseName);
server.registerMBean(new Derived(), derivedName);
server.registerMBean(new Unrelated(), unrelatedName);
assertTrue("Base is an instance Object",
server.isInstanceOf(baseName, Object.class.getName()));