assertEquals(grandParentPool, a3.getClassPool());
}
public void testClassInGrandParentOnlyFromTop() throws Exception
{
ClassPoolDomain grandParent = createClassPoolDomain("GRANDPARENT", null, false);
ClassPool grandParentPool = createDelegatingClassPool(grandParent, JAR_A);
ClassPoolDomain parent = createClassPoolDomain("PARENT", grandParent, false);
ClassPool parentPool = createDelegatingClassPool(parent, JAR_B);
ClassPoolDomain child = createClassPoolDomain("CHILD", parent, false);
ClassPool childPool = createDelegatingClassPool(child, JAR_B);
//The first time we access the pool it will create the classes, second time will use the cache
accessChildInGrandParentOnlyFromTop(grandParentPool, parentPool, childPool);
accessChildInGrandParentOnlyFromTop(grandParentPool, parentPool, childPool);