assertEquals(1, attrs.length);
assertEquals("RegisteredInJmx", attrs[0].getName());
assertTrue(attrs[0].isReadable());
assertFalse(attrs[0].isWritable());
JmxRegistrant bean = (JmxRegistrant) getBean("DirectRegistrant");
assertTrue("MBeanRegistration callbacks invoked", bean.isRegisteredInJmx());
name = new ObjectName("test:name=NotDirectRegistrant");
info = server.getMBeanInfo(name);
assertNotNull(info);
attrs = info.getAttributes();
assertEquals(1, attrs.length);
assertEquals("RegisteredInJmx", attrs[0].getName());
assertTrue(attrs[0].isReadable());
assertFalse(attrs[0].isWritable());
bean = (JmxRegistrant) getBean("NotDirectRegistrant");
assertFalse("MBeanRegistration callbacks not invoked", bean.isRegisteredInJmx());
// Deploy a bean that should fail as it's not an mbean
deploy("JMXDecorated-flawed.xml");
try