public void testUnregisterMBeanOnExceptionFromPreDeregister2() throws Exception
{
MBeanServer server = MBeanServerFactory.newMBeanServer();
ObjectName name = new ObjectName("test:foo=bar");
server.registerMBean(new LockedTest2(), name);
try
{
server.unregisterMBean(name);