public void testClassLoaderPolicyShutdownFromClassLoaderUnregister() throws Exception
{
MockClassLoaderSystem system = createMockClassLoaderSystem();
SimpleMockClassLoaderPolicy policy = new SimpleMockClassLoaderPolicy();
MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
ClassLoader cl = system.registerClassLoaderPolicy(domain, policy);
assertFalse(policy.shutdown);
system.unregisterClassLoader(cl);
assertTrue("Policy should be shutdown", policy.shutdown);