ClassLoader mockClassLoader = system.registerClassLoaderPolicy(mock);
TestClassLoaderPolicy policy = new TestClassLoaderPolicy();
TestClassLoaderPolicyFactory factory = new TestClassLoaderPolicyFactory(policy, true);
policy.packageNames = new String[] { ClassLoaderUtils.getClassPackageName(ClassLoaderDomain.class.getName())};
TestDelegateLoader exported = new TestDelegateLoader(factory);
policy.exported = exported;
system.registerClassLoaderPolicy(policy);
assertLoadClassFail(ClassLoaderDomain.class, mockClassLoader);
assertNotNull("Should have tried to the export delegate ", exported.getResourceInvoked);