assertEmpty(domain.removed);
}
public void testRegisterClassLoaderConstructDomainWithParentDomain() throws Exception
{
MockClassLoaderSystem system = createMockClassLoaderSystem();
ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", ParentPolicy.AFTER, ClassLoaderSystem.DEFAULT_DOMAIN_NAME, "mock");
MockClassLoaderDomain domain = (MockClassLoaderDomain) system.getDomain("test");
MockClassLoaderDomain parent = (MockClassLoaderDomain) system.getDomain(ClassLoaderSystem.DEFAULT_DOMAIN_NAME);
assertEquals(ParentPolicy.AFTER, domain.getParentPolicy());
assertEquals(parent, domain.getParent());
List<ClassLoader> expected = new ArrayList<ClassLoader>();
expected.add(cl1);