serverControl.setThrowable(new NotCompliantMBeanException("Not compliant"));
replayControls();
// Registration must fail since the bean is not mbean compliant and a management
// interface is not provided
MBeanRegistry mbeanRegistry = new MBeanRegistryImpl(errorHandler, log, server,
objectNameBuilder, null);
try
{
mbeanRegistry.registerMBean(calculatorMBean, null, objectName);
fail("Not compliant MBean registered");
}
catch (NotCompliantMBeanException expected)
{
}