{
ClassPool clA = null;
Result rA = new Result();
try
{
BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
createModule("a").
createPackage(PACKAGE_A);
clA = createClassPool(rA, "A", builderA, JAR_A_1);
CtClass classA = assertLoadCtClass(CLASS_A, clA);
assertCannotLoadCtClass(clA, CLASS_B);
assertCannotLoadCtClass(clA, CLASS_C);
ClassPool clB = null;
Result rB = new Result();
try
{
BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
createModule("b").
createPackage(PACKAGE_B).
createReExportModule("a");
clB = createClassPool(rB, "B", builderB, JAR_B_1);
CtClass classA1 = assertLoadCtClass(CLASS_A, clA);
assertSame(classA, classA1);
assertCannotLoadCtClass(clA, CLASS_B);
assertCannotLoadCtClass(clA, CLASS_C);
classA1 = assertLoadCtClass(CLASS_A, clB, clA);
assertSame(classA, classA1);
CtClass classB = assertLoadCtClass(CLASS_B, clB);
assertCannotLoadCtClass(clB, CLASS_C);
ClassPool clC = null;
Result rC = new Result();
try
{
BundleInfoBuilder builderC = BundleInfoBuilder.getBuilder().
createRequirePackage(PACKAGE_B);
clC = createClassPool(rC, "C", builderC, JAR_C_1);
classA1 = assertLoadCtClass(CLASS_A, clA);
assertSame(classA, classA1);