}
public void testGetResourceFromParentBefore() throws Exception
{
ClassLoaderSystem system = createClassLoaderSystem();
ClassLoaderDomain parent = system.createAndRegisterDomain("parent");
MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
policy.setPrefix("a/");
policy.setPath("com/acme/p1");
policy.setPackageNames(new String[] { "com.acme.p1" } );
system.registerClassLoaderPolicy(parent, policy);
ClassLoaderDomain child = system.createAndRegisterDomain("child", ParentPolicy.BEFORE, parent);
MockClassLoaderPolicy policy2 = createMockClassLoaderPolicy();
policy2.setPrefix("b/");
policy2.setPath("com/acme/p1");
ClassLoader classLoader = system.registerClassLoaderPolicy(child, policy2);