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